pysaliency icon indicating copy to clipboard operation
pysaliency copied to clipboard

Error installing pysaliency through pip requirements.txt

Open namwkim opened this issue 2 years ago • 1 comments

Setting:

I have requirements.txt as below:

...
pysaliency==0.2.20
...

Steps to reproduce the problem:

sudo pip3 install -r requirements.txt

Error:

    ERROR: Command errored out with exit status 1:
     command: /Users/nam.wook.kim/Projects/vislab/env/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/hf/s4wflwvn133cxdhqnln404vw0000gn/T/pip-install-0911sp1o/pysaliency_a0e3a46569494c3ba607eb6126b4c59b/setup.py'"'"'; __file__='"'"'/private/var/folders/hf/s4wflwvn133cxdhqnln404vw0000gn/T/pip-install-0911sp1o/pysaliency_a0e3a46569494c3ba607eb6126b4c59b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/hf/s4wflwvn133cxdhqnln404vw0000gn/T/pip-pip-egg-info-og66mmr4
         cwd: /private/var/folders/hf/s4wflwvn133cxdhqnln404vw0000gn/T/pip-install-0911sp1o/pysaliency_a0e3a46569494c3ba607eb6126b4c59b/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/hf/s4wflwvn133cxdhqnln404vw0000gn/T/pip-install-0911sp1o/pysaliency_a0e3a46569494c3ba607eb6126b4c59b/setup.py", line 7, in <module>
        import numpy as np
    ModuleNotFoundError: No module named 'numpy'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/04/51/bedc02df4be75662d2d11a474c669c67ba4dc495be249a5e6cd4be7a0625/pysaliency-0.2.20.tar.gz#sha256=f3a05df32e4b31a2e459ccfa653686cdde169a45017ac6e15af6cfac276187b3 (from https://pypi.org/simple/pysaliency/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pysaliency==0.2.20 (from versions: 0.2.0, 0.2.3, 0.2.17, 0.2.19, 0.2.20, 0.2.21)
ERROR: No matching distribution found for pysaliency==0.2.20

Solution

Installing Cython and numpy before pip install solves the issue.

sudo pip3 install Cython
sudo pip3 install numpy
sudo pip3 install -r requirements.txt

namwkim avatar Aug 10 '21 00:08 namwkim

nice, thanks for the solution and pysaliency-0.2.21 encounters a stupid numpy env issue: https://stackoverflow.com/questions/66060487/valueerror-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-exp only pysaliency-0.2.20 works for me

MarcWong avatar May 12 '22 13:05 MarcWong