我正在尝试使用新的PTVS
在Visual Studio 2013
中设置Python开发环境。但是,我需要能够在Python 2.7和Python 3.3中进行开发。以下是我到目前为止两个版本所做的事情:
distribute
pip
C:\Python 3.3\Scripts
& C:\Python 2.7\Scripts
到我的Path环境变量。所以在Scripts文件夹中我有:
PIP-3.3.exe
easy_install.exe
可执行文件是相应的python脚本。
现在已经这样做了,我正在尝试安装Python模块RPi.GPIO
,但是我收到以下错误消息:
C:\Windows\system32>pip-2.7 install RPi.GPIO==0.5.3a
Downloading/unpacking RPi.GPIO==0.5.3a
Downloading RPi.GPIO-0.5.3a.tar.gz
Running setup.py egg_info for package RPi.GPIO
Installing collected packages: RPi.GPIO
Running setup.py install for RPi.GPIO
building 'RPi.GPIO' extension
error: Unable to find vcvarsall.bat
Complete output from command "C:\Program Files\Python 2.7\python.exe" -c "import set
uptools;__file__='c:\\users\\jon\\appdata\\local\\temp\\pip_build_Jon\\RPi.GPIO\\setup.p
y';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install
--record c:\users\jon\appdata\local\temp\pip-svl0a1-record\install-record.txt --single-
version-externally-managed:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\RPi
copying RPi\__init__.py -> build\lib.win-amd64-2.7\RPi
running build_ext
building 'RPi.GPIO' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Cleaning up...
Command "C:\Program Files\Python 2.7\python.exe" -c "import setuptools;__file__='c:\\use
rs\\jon\\appdata\\local\\temp\\pip_build_Jon\\RPi.GPIO\\setup.py';exec(compile(open(__fi
le__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\jon\ap
pdata\local\temp\pip-svl0a1-record\install-record.txt --single-version-externally-manage
d failed with error code 1 in c:\users\jon\appdata\local\temp\pip_build_Jon\RPi.GPIO
Storing complete log in C:\Users\Jon\pip\pip.log
C:\Windows\system32>
它正在努力尝试,但它在某个地方失败了,我无法追溯到源头。同样,我总是得到error: Unable to find vcvarsall.bat
知道我尝试安装的模块。会导致这种情况的原因是什么?
我试过从环境变量中删除了一个解释器路径,因为我认为重复easy_install.exe instances might be conflicting
。 进行此更改无效。
安装应该如下所示:
pip-2.7 install RPi.GPIO==0.5.3a
或
pip-3.3 install RPi.GPIO==0.5.3a
更新:我刚尝试使用以下命令安装RPi.GPIO:
pip-3.3 install RPi.GPIO
并且已成功安装,但版本已过时。 HM ..?