I'm using python 2.7.9 (64 bit) with pip 1.5.6 and virtualenv 12.1.1 on Windows 7 powershell. I created a virtual environment named NeuralNetwork and I'm trying to install the package fann2 1.0.7:
我在Windows 7 PowerShell上使用python 2.7.9(64位)和pip 1.5.6以及virtualenv 12.1.1。我创建了一个名为NeuralNetwork的虚拟环境,我正在尝试安装包fann2 1.0.7:
PS C:\Python27\envs\NeuralNetwork\Scripts> pip.exe install fann2
Collecting fann2
(...)
Exception: Couldn't find swig2.0 binary!
I guess I have to install this swig2.0 binary
for Windows 7, but I can't figure out how exacly. I went to a swig site I found on Google and downloaded swigwin 2.0.12. The zip file came with a pre-compiled swig.exe
. I read the documentation for Windows, but I didn't understand where should I put this file nor how to proceed afterward. I'm new to python and I've never heard of swig before. Could someone please help me?
我想我必须为Windows 7安装这个swig2.0二进制文件,但我无法弄清楚它是多么出类拔萃。我去了一个我在Google上找到的swig网站并下载了swigwin 2.0.12。该zip文件附带预编译的swig.exe。我阅读了Windows的文档,但我不明白我应该把这个文件放在哪里,以及后来如何继续。我是python的新手,我以前从未听说过swig。有人可以帮帮我吗?
1 个解决方案
#1
I discovered what the problem was: swig.exe
wasn't in Windows PATH variable. To fix this:
我发现了问题所在:swig.exe不在Windows PATH变量中。解决这个问题:
- Unzip
swigwin
wherever you want. - Add the directory path where
swig.exe
is located to the Windows PATH variable.
随时随地解压缩swigwin。
将swig.exe所在的目录路径添加到Windows PATH变量。
To add swig.exe
directory to the PATH variable:
要将swig.exe目录添加到PATH变量:
- Start the System Control Panel applet (Start - Settings - Control Panel - System).
- Select the Advanced tab.
- Click the Environment Variables button.
- Under System Variables, select Path, then click Edit.
- Put a
;
and append the directory path whereswig.exe
is located to the end of the strig.
启动系统控制面板小程序(开始 - 设置 - 控制面板 - 系统)。
选择“高级”选项卡。
单击“环境变量”按钮。
在“系统变量”下,选择“路径”,然后单击“编辑”。
放一个;并将swig.exe所在的目录路径附加到strig的末尾。
#1
I discovered what the problem was: swig.exe
wasn't in Windows PATH variable. To fix this:
我发现了问题所在:swig.exe不在Windows PATH变量中。解决这个问题:
- Unzip
swigwin
wherever you want. - Add the directory path where
swig.exe
is located to the Windows PATH variable.
随时随地解压缩swigwin。
将swig.exe所在的目录路径添加到Windows PATH变量。
To add swig.exe
directory to the PATH variable:
要将swig.exe目录添加到PATH变量:
- Start the System Control Panel applet (Start - Settings - Control Panel - System).
- Select the Advanced tab.
- Click the Environment Variables button.
- Under System Variables, select Path, then click Edit.
- Put a
;
and append the directory path whereswig.exe
is located to the end of the strig.
启动系统控制面板小程序(开始 - 设置 - 控制面板 - 系统)。
选择“高级”选项卡。
单击“环境变量”按钮。
在“系统变量”下,选择“路径”,然后单击“编辑”。
放一个;并将swig.exe所在的目录路径附加到strig的末尾。