Python 2.7出现了一个奇怪的问题
当我在virtualenv中运行pip install numpy
时,它报告成功:
Added numpy from https://files.pythonhosted.org/packages/de/37/fe7db552f4507f379d81dcb78e58e05030a8941757b1f664517d581b5553/numpy-1.15.4-cp27-cp27mu-manylin
ux1_x86_64.whl#sha256=0df89ca13c25eaa1621a3f09af4c8ba20da849692dcae184cb55e80952c453fb to build tracker '/tmp/pip-req-tracker-3MfIdU'
Removed numpy from https://files.pythonhosted.org/packages/de/37/fe7db552f4507f379d81dcb78e58e05030a8941757b1f664517d581b5553/numpy-1.15.4-cp27-cp27mu-manyl
inux1_x86_64.whl#sha256=0df89ca13c25eaa1621a3f09af4c8ba20da849692dcae184cb55e80952c453fb from build tracker '/tmp/pip-req-tracker-3MfIdU'
Installing collected packages: numpy
Successfully installed numpy-1.15.4
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-3MfIdU'
但是随后该软件包与pip list
不存在,并且无法导入:
Package Version
---------- -------
pip 18.1
setuptools 40.6.3
wheel 0.32.3
它确实在venv之外的全局环境中工作,我在venv中与其他软件包无关。
我再次检查了pip
是否指向virtualenv / bin文件夹中的pip二进制文件。