Unable to install any package through pip

前端 未结 2 448
囚心锁ツ
囚心锁ツ 2020-12-22 09:37

For some reason I have issues installing new packages with my pip. I have an OS Sierra environment and everything was working fine before. Now either I use a virtualenv or n

相关标签:
2条回答
  • 2020-12-22 10:35

    The solution proposed by user1919 helped me to resolve installation of tox on lxc ubuntu container as the defualt pip version 8 doesn't recognize the correct url

    I used:

    pip install -v tox -i https://pypi.python.org/simple/
    ....
    ....
    ....
    Successfully installed filelock-3.0.10 pluggy-0.9.0 py-1.8.0 setuptools-40.8.0 toml-0.10.0 tox-3.7.0 virtualenv-16.4.3
    
    0 讨论(0)
  • 2020-12-22 10:40

    Thanks to @Klaus D. comment (proposed to add: the -v flag in the command), I found out that the URL for:

      http://pypi.python.org/simple/requests/ 
    

    needs to be changed to

      https://pypi.python.org/simple/requests/  (with SSL).
    

    Executing this command worked fine:

    pip install -v requests -i https://pypi.python.org/simple/
    

    Alternatively you can change the pip.conf file as described in one of the answers here:

    [global]
    timeout = 60
    index-url = https://pypi.python.org/simple
    
    0 讨论(0)
提交回复
热议问题