我在一个virtualenv中运行Python并检查了pip和setuptools。安装如下:
(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 vs 32位)冲突,无法使用它。我已经被困在这里一段时间,无法找到解决方案。有任何想法吗?