Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation broken in python 3.7 #253

Open
bendichter opened this issue Feb 17, 2020 · 7 comments
Open

installation broken in python 3.7 #253

bendichter opened this issue Feb 17, 2020 · 7 comments

Comments

@bendichter
Copy link

(sima2) Bens-MacBook-Pro-2:sima bendichter$ pip install sima
Collecting sima
  Using cached sima-1.3.2.tar.gz (3.1 MB)
Requirement already satisfied: numpy>=1.8 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from sima) (1.18.1)
Requirement already satisfied: scipy>=0.13.0 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from sima) (1.4.1)
Requirement already satisfied: scikit-image>=0.9.3 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from sima) (0.16.2)
Requirement already satisfied: shapely>=1.2.14 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from sima) (1.7.0)
Requirement already satisfied: scikit-learn>=0.11 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from sima) (0.22.1)
Requirement already satisfied: pillow>=2.6.1 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from sima) (7.0.0)
Requirement already satisfied: future>=0.14 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from sima) (0.18.2)
Requirement already satisfied: PyWavelets>=0.4.0 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from scikit-image>=0.9.3->sima) (1.1.1)
Requirement already satisfied: imageio>=2.3.0 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from scikit-image>=0.9.3->sima) (2.6.1)
Requirement already satisfied: networkx>=2.0 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from scikit-image>=0.9.3->sima) (2.4)
Requirement already satisfied: matplotlib!=3.0.0,>=2.0.0 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from scikit-image>=0.9.3->sima) (3.1.3)
Requirement already satisfied: joblib>=0.11 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from scikit-learn>=0.11->sima) (0.14.1)
Requirement already satisfied: decorator>=4.3.0 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from networkx>=2.0->scikit-image>=0.9.3->sima) (4.4.1)
Requirement already satisfied: cycler>=0.10 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.9.3->sima) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.9.3->sima) (2.4.6)
Requirement already satisfied: python-dateutil>=2.1 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.9.3->sima) (2.8.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.9.3->sima) (1.1.0)
Requirement already satisfied: six in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from cycler>=0.10->matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.9.3->sima) (1.14.0)
Requirement already satisfied: setuptools in /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages (from kiwisolver>=1.0.1->matplotlib!=3.0.0,>=2.0.0->scikit-image>=0.9.3->sima) (45.2.0.post20200210)
Building wheels for collected packages: sima
  Building wheel for sima (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/bendichter/opt/anaconda3/envs/sima2/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cg/mhhypnc14wn9kz5ydllymyc00000gp/T/pip-install-zt7v3iwp/sima/setup.py'"'"'; __file__='"'"'/private/var/folders/cg/mhhypnc14wn9kz5ydllymyc00000gp/T/pip-install-zt7v3iwp/sima/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/cg/mhhypnc14wn9kz5ydllymyc00000gp/T/pip-wheel-0tuk0skn
       cwd: /private/var/folders/cg/mhhypnc14wn9kz5ydllymyc00000gp/T/pip-install-zt7v3iwp/sima/
  Complete output (162 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.7
  creating build/lib.macosx-10.9-x86_64-3.7/sima
  copying sima/ROI.py -> build/lib.macosx-10.9-x86_64-3.7/sima
  copying sima/spikes.py -> build/lib.macosx-10.9-x86_64-3.7/sima
  copying sima/sequence.py -> build/lib.macosx-10.9-x86_64-3.7/sima
  copying sima/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/sima
  copying sima/imaging.py -> build/lib.macosx-10.9-x86_64-3.7/sima
  copying sima/extract.py -> build/lib.macosx-10.9-x86_64-3.7/sima
  copying sima/imaging_parameters.py -> build/lib.macosx-10.9-x86_64-3.7/sima
  creating build/lib.macosx-10.9-x86_64-3.7/sima/misc
  copying sima/misc/align.py -> build/lib.macosx-10.9-x86_64-3.7/sima/misc
  copying sima/misc/tifffile.py -> build/lib.macosx-10.9-x86_64-3.7/sima/misc
  copying sima/misc/convert.py -> build/lib.macosx-10.9-x86_64-3.7/sima/misc
  copying sima/misc/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/sima/misc
  copying sima/misc/imagej.py -> build/lib.macosx-10.9-x86_64-3.7/sima/misc
  creating build/lib.macosx-10.9-x86_64-3.7/sima/motion
  copying sima/motion/frame_align.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion
  copying sima/motion/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion
  copying sima/motion/motion.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion
  copying sima/motion/transform.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion
  copying sima/motion/dftreg.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion
  copying sima/motion/hmm.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion
  package init file 'sima/motion/tests/__init__.py' not found (or not a regular file)
  creating build/lib.macosx-10.9-x86_64-3.7/sima/motion/tests
  copying sima/motion/tests/test_frame_align.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion/tests
  copying sima/motion/tests/test_motion.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion/tests
  copying sima/motion/tests/test_dftreg.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion/tests
  copying sima/motion/tests/test_hmm.py -> build/lib.macosx-10.9-x86_64-3.7/sima/motion/tests
  creating build/lib.macosx-10.9-x86_64-3.7/sima/segment
  copying sima/segment/normcut.py -> build/lib.macosx-10.9-x86_64-3.7/sima/segment
  copying sima/segment/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/sima/segment
  copying sima/segment/stica.py -> build/lib.macosx-10.9-x86_64-3.7/sima/segment
  copying sima/segment/segment.py -> build/lib.macosx-10.9-x86_64-3.7/sima/segment
  copying sima/segment/oPCA.py -> build/lib.macosx-10.9-x86_64-3.7/sima/segment
  copying sima/segment/ca1pc.py -> build/lib.macosx-10.9-x86_64-3.7/sima/segment
  package init file 'sima/segment/tests/__init__.py' not found (or not a regular file)
  creating build/lib.macosx-10.9-x86_64-3.7/sima/segment/tests
  copying sima/segment/tests/test_normcut.py -> build/lib.macosx-10.9-x86_64-3.7/sima/segment/tests
  copying sima/segment/tests/test_oPCA.py -> build/lib.macosx-10.9-x86_64-3.7/sima/segment/tests
  copying sima/segment/tests/test_segment.py -> build/lib.macosx-10.9-x86_64-3.7/sima/segment/tests
  creating build/lib.macosx-10.9-x86_64-3.7/sima/tests
  copying sima/tests/test_sequence.py -> build/lib.macosx-10.9-x86_64-3.7/sima/tests
  copying sima/tests/test_ROI.py -> build/lib.macosx-10.9-x86_64-3.7/sima/tests
  copying sima/tests/test_spikes.py -> build/lib.macosx-10.9-x86_64-3.7/sima/tests
  copying sima/tests/test_imaging.py -> build/lib.macosx-10.9-x86_64-3.7/sima/tests
  copying sima/tests/test_extract.py -> build/lib.macosx-10.9-x86_64-3.7/sima/tests
  creating build/lib.macosx-10.9-x86_64-3.7/sima/tests/data
  creating build/lib.macosx-10.9-x86_64-3.7/sima/tests/data/example.sima
  copying sima/tests/data/example.sima/dataset.pkl -> build/lib.macosx-10.9-x86_64-3.7/sima/tests/data/example.sima
  copying sima/tests/data/example.sima/displacements.pkl -> build/lib.macosx-10.9-x86_64-3.7/sima/tests/data/example.sima
  copying sima/tests/data/example.tif -> build/lib.macosx-10.9-x86_64-3.7/sima/tests/data
  copying sima/tests/data/example.h5 -> build/lib.macosx-10.9-x86_64-3.7/sima/tests/data
  copying sima/tests/data/example-volume.h5 -> build/lib.macosx-10.9-x86_64-3.7/sima/tests/data
  copying sima/tests/data/imageJ_ROIs.zip -> build/lib.macosx-10.9-x86_64-3.7/sima/tests/data
  creating build/lib.macosx-10.9-x86_64-3.7/sima/tests/data/example-tiffs
  copying sima/tests/data/example-tiffs/2.tif -> build/lib.macosx-10.9-x86_64-3.7/sima/tests/data/example-tiffs
  copying sima/tests/data/example-tiffs/0.tif -> build/lib.macosx-10.9-x86_64-3.7/sima/tests/data/example-tiffs
  copying sima/tests/data/example-tiffs/1.tif -> build/lib.macosx-10.9-x86_64-3.7/sima/tests/data/example-tiffs
  running build_ext
  building 'sima.motion._motion' extension
  creating build/temp.macosx-10.9-x86_64-3.7
  creating build/temp.macosx-10.9-x86_64-3.7/sima
  creating build/temp.macosx-10.9-x86_64-3.7/sima/motion
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/bendichter/opt/anaconda3/envs/sima2/include -arch x86_64 -I/Users/bendichter/opt/anaconda3/envs/sima2/include -arch x86_64 -I/Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages/numpy/core/include -I/Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m -c sima/motion/_motion.c -o build/temp.macosx-10.9-x86_64-3.7/sima/motion/_motion.o
  In file included from sima/motion/_motion.c:289:
  In file included from /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
  In file included from /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
  In file included from /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:
  /Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
  #warning "Using deprecated NumPy API, disable it with " \
   ^
  sima/motion/_motion.c:10741:21: error: no member named 'exc_type' in 'struct _ts'
      *type = tstate->exc_type;
              ~~~~~~  ^
  sima/motion/_motion.c:10742:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      *value = tstate->exc_value;
                       ^~~~~~~~~
                       curexc_value
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  sima/motion/_motion.c:10743:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      *tb = tstate->exc_traceback;
                    ^~~~~~~~~~~~~
                    curexc_traceback
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  sima/motion/_motion.c:10750:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  sima/motion/_motion.c:10751:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  sima/motion/_motion.c:10752:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  sima/motion/_motion.c:10753:13: error: no member named 'exc_type' in 'struct _ts'
      tstate->exc_type = type;
      ~~~~~~  ^
  sima/motion/_motion.c:10754:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tstate->exc_value = value;
              ^~~~~~~~~
              curexc_value
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  sima/motion/_motion.c:10755:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tstate->exc_traceback = tb;
              ^~~~~~~~~~~~~
              curexc_traceback
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  sima/motion/_motion.c:10810:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  sima/motion/_motion.c:10811:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  sima/motion/_motion.c:10812:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  sima/motion/_motion.c:10813:13: error: no member named 'exc_type' in 'struct _ts'
      tstate->exc_type = local_type;
      ~~~~~~  ^
  sima/motion/_motion.c:10814:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tstate->exc_value = local_value;
              ^~~~~~~~~
              curexc_value
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  sima/motion/_motion.c:10815:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tstate->exc_traceback = local_tb;
              ^~~~~~~~~~~~~
              curexc_traceback
  /Users/bendichter/opt/anaconda3/envs/sima2/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  1 warning and 15 errors generated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for sima
  Running setup.py clean for sima
Failed to build sima
Installing collected packages: sima
^C    Running setup.py install for sima ... canceled
@bendichter
Copy link
Author

bendichter commented Feb 17, 2020

this worked for me

edit: actually I am not sure it worked

(sima2) Bens-MacBook-Pro-2:sima bendichter$ find . -name '*.pyx' -exec cython {} \;
/Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /Users/bendichter/dev/sima/sima/segment/_opca.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
/Users/bendichter/opt/anaconda3/envs/sima2/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /Users/bendichter/dev/sima/sima/motion/_motion.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
>>> import sima
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/bendichter/dev/sima/sima/__init__.py", line 6, in <module>
    from sima.imaging import ImagingDataset
  File "/Users/bendichter/dev/sima/sima/imaging.py", line 35, in <module>
    from sima.segment import ca1pc
  File "/Users/bendichter/dev/sima/sima/segment/__init__.py", line 11, in <module>
    from .stica import STICA
  File "/Users/bendichter/dev/sima/sima/segment/stica.py", line 15, in <module>
    from . import oPCA
  File "/Users/bendichter/dev/sima/sima/segment/oPCA.py", line 18, in <module>
    from . import _opca
ImportError: cannot import name '_opca' from 'sima.segment' (/Users/bendichter/dev/sima/sima/segment/__init__.py)

@bendichter
Copy link
Author

This problem is not present in python 3.6, only in python 3.7

@Saksham20
Copy link

I had a similar issue while installing sima. There is no 'wheels' dist for sima yet and depending on the pip version you're using, it will look for this. It might be working on the older python version because of an older pip version. The work around is to install a wheels dist of sima from here
and run:
pip install <filename.whl>

@Saksham20
Copy link

I think the wheels dist needs to be published on PiPY for the standard 'pip install sima' to work

@scottclowe
Copy link

I had a similar issue while installing sima. There is no 'wheels' dist for sima yet and depending on the pip version you're using, it will look for this. It might be working on the older python version because of an older pip version. The work around is to install a wheels dist of sima from here
and run:
pip install <filename.whl>

This is a solution for Windows users, but @bendichter is on Mac OSX.

I similarly can't get a wheel of sima to compile on Ubuntu for Python 3.7 or 3.8, and so can't install it on Python 3.7 or 3.8.

@areiasfi
Copy link

areiasfi commented Jun 21, 2021

I had a similar issue while installing sima. There is no 'wheels' dist for sima yet and depending on the pip version you're using, it will look for this. It might be working on the older python version because of an older pip version. The work around is to install a wheels dist of sima from here
and run:
pip install <filename.whl>

Hi,
This solution does not work for me. I use windows 10 and python 3.7 and I get this error:
...\cl.exe' failed with exit status 2

@simbru
Copy link

simbru commented Dec 15, 2021

This problem is not present in python 3.6, only in python 3.7

I had no issues with installing in an environment with Python version 3.6.13. Did not work for recent versions (e.g. 3.9.5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants