2015-12-02 85 views
1

我想爲python3安裝virtualenv。 我一直試圖找出過去一小時,沒有運氣。pip3失敗,但點子與virtualenv正常工作

[email protected]:~# pip3 install virtualenv 
Downloading/unpacking virtualenv 
    Cannot fetch index base URL https://pypi.python.org/simple/ 
    Could not find any downloads that satisfy the requirement virtualenv 
Cleaning up... 
No distributions at all found for virtualenv 
Storing debug log for failure in /root/.pip/pip.log 
[email protected]:~# vim /root/.pip/pip.log 
[email protected]:~# pip install virtualenv 
Downloading/unpacking virtualenv 
    Downloading virtualenv-13.1.2-py2.py3-none-any.whl (1.7MB): 1.7MB downloaded 
Installing collected packages: virtualenv 
Successfully installed virtualenv 
Cleaning up... 

正如您所看到的,pip工作得很好,但pip3超時。

據失敗輸出pip.log,PIP3超時試圖從PyPI將要求:

/usr/bin/pip3 run on Wed Dec 2 08:45:51 2015 
Downloading/unpacking virtualenv 
    Getting page https://pypi.python.org/simple/virtualenv/ 
    Could not fetch URL https://pypi.python.org/simple/virtualenv/: timed out 
    Will skip URL https://pypi.python.org/simple/virtualenv/ when looking for download links for virtualenv 
    Getting page https://pypi.python.org/simple/ 
    Could not fetch URL https://pypi.python.org/simple/: timed out 
    Will skip URL https://pypi.python.org/simple/ when looking for download links for virtualenv 
    Cannot fetch index base URL https://pypi.python.org/simple/ 
    URLs to search for versions for virtualenv: 
    * https://pypi.python.org/simple/virtualenv/ 
    Getting page https://pypi.python.org/simple/virtualenv/ 
    Could not fetch URL https://pypi.python.org/simple/virtualenv/: timed out 
    Will skip URL https://pypi.python.org/simple/virtualenv/ when looking for download links for virtualenv 
    Could not find any downloads that satisfy the requirement virtualenv 
Cleaning up... 
    Removing temporary dir /tmp/pip_build_root... 
No distributions at all found for virtualenv 
Exception information: 
Traceback (most recent call last): 
    File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main 
    status = self.run(options, args) 
    File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 278, in run 
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) 
    File "/usr/lib/python3/dist-packages/pip/req.py", line 1178, in prepare_files 
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade) 
    File "/usr/lib/python3/dist-packages/pip/index.py", line 277, in find_requirement 
    raise DistributionNotFound('No distributions at all found for %s' % req) 
pip.exceptions.DistributionNotFound: No distributions at all found for virtualenv 

任何提示,我怎麼能解決這個將是巨大的。提前致謝。

回答

2

沒有virtualenv中的PIP 3,但它很容易建立一個新的環境中使用python3

  1. 您與正常PIP安裝

pip install virtualenv

  • 配置新virtualenv使用python3
  • virtualenv -p python3 envname

    +0

    我在你回答的時候已經想到了這一點,但現在試圖在我的virtualenv中使用點子,我仍然得到超時錯誤。 'ConnectTimeoutError(,'Connection to ...')重試(重試(總= 4,連接=無,讀=無,重定向=無) (連接超時= 15)')':/ simple/cassandra-driver/ – Seaux

    +0

    您是否激活了環境,並且在環境中使用了'pip3'? – Altoyyr

    +0

    我已經激活了env,我使用的是pip而不是pip3,也許這就是問題所在? 'pip --version'產量: pip 7.1.2 from /var/virtualenvs/backend/lib/python3.4/site-packages(python 3.4) – Seaux

    相關問題