我發現MarkupSafe在主機環境中安裝得很好,但在virtualenv中,pip默默地失敗。MarkupSafe不會安裝在亞馬遜Linux上的virtualenv上
[[email protected] ~]$ virtualenv testenv
New python executable in testenv/bin/python2.7
Also creating executable in testenv/bin/python
Installing setuptools, pip...done.
[[email protected] ~]$ \. testenv/bin/activate
(testenv)[[email protected] ~]$ pip install
You are using pip version 6.0.8, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
You must give at least one requirement to install (see "pip help install")
(testenv)[[email protected] ~]$ pip install --upgrade pip
You are using pip version 6.0.8, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-7.1.2-py2.py3-none-any.whl#md5=5ff9fec0be479e4e36df467556deed4d
Using cached pip-7.1.2-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 6.0.8
Uninstalling pip-6.0.8:
Successfully uninstalled pip-6.0.8
Successfully installed pip-7.1.2
(testenv)[[email protected] ~]$ pip install pip
Requirement already satisfied (use --upgrade to upgrade): pip in ./testenv/lib/python2.7/dist-packages
(testenv)[[email protected] ~]$ pip install markupsafe
Collecting markupsafe
Using cached MarkupSafe-0.23.tar.gz
Installing collected packages: markupsafe
Running setup.py install for markupsafe
Successfully installed markupsafe
(testenv)[[email protected] ~]$ pip install markupsafe
Collecting markupsafe
Using cached MarkupSafe-0.23.tar.gz
Installing collected packages: markupsafe
Running setup.py install for markupsafe
Successfully installed markupsafe
(testenv)[[email protected] ~]$ which python
~/testenv/bin/python
(testenv)[[email protected] ~]$ python
Python 2.7.10 (default, Dec 8 2015, 18:25:23)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import markupsafe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named markupsafe
>>>
(testenv)[[email protected] ~]$ pip freeze
(testenv)[[email protected] ~]$
不知道下一步是什麼,或者這可能是誰的錯。 我的下一步行動是什麼?
補充說:還記錄針對的virtualenv一個問題:https://github.com/pypa/virtualenv/issues/836
您的主目錄中有一個「$ HOME/.pip/pip.log」文件。它有說什麼嗎? – ipinak
@ipinak,沒有這樣的文件。我嘗試使用--log pip.log進行安裝,並且它告訴我上面顯示的同樣的「正在收集......正在安裝......成功安裝」的謊言,沒有附加信息 – djsadinoff
嘿。你能解決嗎? 我面臨同樣的問題。 –