4

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:

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?

0

2 Answers 2

5

I discovered what the problem was: swig.exe wasn't in Windows PATH variable. To fix this:

  1. Unzip swigwin wherever you want.
  2. Add the directory path where swig.exeis located to the Windows PATH variable.

To add swig.exe directory to the PATH variable:

  1. Start the System Control Panel applet (Start - Settings - Control Panel - System).
  2. Select the Advanced tab.
  3. Click the Environment Variables button.
  4. Under System Variables, select Path, then click Edit.
  5. Put a ; and append the directory path where swig.exeis located to the end of the strig.
0

If your Python Scripts folder is on your PATH in Windows (e.g. C:\Users\<username>\AppData\Roaming\Python\Python39\Scripts for Python 3.9), then you can just pip install swig.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.