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

Error installing pysaliency through pip requirements.txt #19

Open
namwkim opened this issue Aug 10, 2021 · 1 comment
Open

Error installing pysaliency through pip requirements.txt #19

namwkim opened this issue Aug 10, 2021 · 1 comment

Comments

@namwkim
Copy link

namwkim commented Aug 10, 2021

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

@MarcWong
Copy link

MarcWong commented May 12, 2022

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

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

2 participants