我有Python在virtualenv中運行並檢查了pip和setuptools。設置如下:由於setuptools錯誤,無法在virtualenv中安裝pyvisa
(venv)root ~/Desktop/virtualenv # pip list
pip (6.0.8)
setuptools (14.3.1)
然後試圖安裝pyvisa和遇到setuptools的錯誤
(venv)root ~/Desktop/virtualenv # pip install -U pyvisa
Collecting pyvisa
Using cached PyVISA-1.6.3.zip
setuptools must be installed to install from a source distribution
我試圖安裝本地包,也有類似的錯誤:
(venv)root ~/Desktop/virtualenv/pyvisa-master # python setup.py install
Please install or upgrade setuptools or pip to continue
這裏是我的Python和Linux(64位CentOS)環境:
(venv)root ~/Desktop/virtualenv # python -V
Python 2.7.9
(venv)root ~/Desktop/virtualenv # uname -a
Linux localhost.localdomain 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 17 01:55:02 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
主要的Python環境(v2.6.6)沒有這個問題。但由於與NI-VISA(64與32位)的架構衝突,不能使用它。我在這裏呆了一段時間,找不到解決方案。有任何想法嗎?