Could not find a version that satisfies the requirement

后端 未结 12 1163
耶瑟儿~
耶瑟儿~ 2020-11-29 17:34

I\'m installing several Python packages in Ubuntu 12.04 using the following requirements.txt file:

numpy>=1.8.2,<2.0.0
matplotlib>=1.3.         


        
相关标签:
12条回答
  • 2020-11-29 18:25

    I got this error while installing awscli on Windows 10 in anaconda (python 3.7). While troubleshooting, I went to the answer https://stackoverflow.com/a/49991357/6862405 and then to https://stackoverflow.com/a/54582701/6862405. Finally found that I need to install the libraries PyOpenSSL, cryptography, enum34, idna and ipaddress. After installing these (using simply pip install command), I was able to install awscli.

    0 讨论(0)
  • 2020-11-29 18:26

    I had installed python3 but my python in /usr/bin/python was still the old 2.7 version

    This worked (<pkg> was pyserial in my case):

    python3 -m pip install <pkg>
    
    0 讨论(0)
  • 2020-11-29 18:28

    Use Command Prompt, and then select Run as administrator.

    Upgrade the pip version

    To upgrade PIP, type this command, and then press Enter:-

    python.exe -m pip install --upgrade pip

    Go Back to python path C:\Users\Jack\AppData\Local\Programs\Python\Python37\Scripts

    Type jupyter notebook

    You will be redirected to http://localhost:8888/undefined/tree - Jupyter Home Page

    Hope it helps !!!!!!!!!!!

    0 讨论(0)
  • 2020-11-29 18:30

    After 2 hours of searching, I found a way to fix it with just one line of command. You need to know the version of the package (Just search up PACKAGE version).

    Command:

    python3 -m pip install --pre --upgrade PACKAGE==VERSION.VERSION.VERSION
    
    0 讨论(0)
  • 2020-11-29 18:31

    Not always, but in some cases the package already exists. For example - getpass. It is not listed by "pip list" but it can be imported and used:

    If I try to pip install getpass I get the following error: "Could not find a version that satisfies the requirement getpass"

    0 讨论(0)
  • 2020-11-29 18:36

    This approach (having all dependencies in a directory and not downloading from an index) only works when the directory contains all packages. The directory should therefore contain all dependencies but also all packages that those dependencies depend on (e.g., six, pytz etc).

    You should therefore manually include these in requirements.txt (so that the first step downloads them explicitly) or you should install all packages using PyPI and then pip freeze > requirements.txt to store the list of all packages needed.

    0 讨论(0)
提交回复
热议问题