nickmckay / LiPD-utilities

Input/output and manipulation utilities for LiPD files in Matlab, R and Python
http://nickmckay.github.io/LiPD-utilities/
GNU General Public License v2.0
29 stars 9 forks source link

LiPD utilities in Python not compatible with newer version of numpy #43

Closed khider closed 6 years ago

khider commented 6 years ago
screen shot 2018-07-26 at 6 10 15 pm

import lipd as lpd //anaconda/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88 return f(*args, **kwds) Traceback (most recent call last): File "", line 1, in File "//anaconda/lib/python3.5/site-packages/lipd/init.py", line 13, in from lipd.json_viewer import viewLipd File "//anaconda/lib/python3.5/site-packages/lipd/json_viewer.py", line 16, in from PyQt5 import QtCore ImportError: dlopen(//anaconda/lib/python3.5/site-packages/PyQt5/QtCore.so, 2): Symbol not found: _PySlice_AdjustIndices Referenced from: //anaconda/lib/python3.5/site-packages/PyQt5/QtCore.so Expected in: flat namespace in //anaconda/lib/python3.5/site-packages/PyQt5/QtCore.so

chrismheiser commented 6 years ago

@khider I added specific, working, versions of the package dependencies to setup.py. If you update to LiPD 0.2.5.7, it will have the fixes and should work fine. I tested it in a new environment and it imported.

khider commented 6 years ago

After fighting for most of the morning with spyder, which is no longer compatible with the latest PyQT5, I was forced to go back to pyqt5-5.9.2. Since a lot of our users are going to be using Spyder or Jupyter Notebook, I suggest you block the LiPD version to 5.9.2 as well to prevent automatic upgrade.

chrismheiser commented 6 years ago

LiPD will only install PyQt5 v5.9 if it needs to. Could another package be updating it?

    install_requires=[
        "bagit==1.5.4",
        "demjson==2.2.4",
        "xlrd==1.1.0",
        "numpy==1.13.1",
        "pandas==0.20.3",
        "requests==2.18.4",
        "sip==4.19.3",
        "PyQt5==5.9",
    ],
khider commented 6 years ago

Did you check numpy? This is the first warning I get.

khider commented 6 years ago

These are the versions I have on my computer now and it's working: bagit: 1.7.0 demjson: 2.2.4 xlrd: 1.1.0 numpy: 1.15.0 pandas: 0.23.3 requests: 2.19.1 sip: 4.19.8 PyQT5: 5.9.2

chrismheiser commented 6 years ago

If those are working I'll increase the version requirements. My list was what I had on my working version so I thought we could start there.

khider commented 6 years ago

I need to do some testing on Pyleoclim because it may no longer be compatible with the latest numpy (floats are no longer permitted as indexes and I wasn't stringent on that rule.). Also, note that numpy 1.16 will drop compatibility with Python 3.4 and numpy 1.17 will drop compatibility with 2.7.

chrismheiser commented 6 years ago

That's fine. We can stick to 1.15.0 in the requirements.