Pip cannot install the package because it cannot find the swig2.0 binary

I am using python 2.7.9 (64 bit) with pip 1.5.6 and virtualenv 12.1.1 on Windows PowerWorks. I created a virtual environment called NeuralNetwork and I am trying to install the fann2 1.0.7 package:

PS C:\Python27\envs\NeuralNetwork\Scripts> pip.exe install fann2
Collecting fann2
(...)
Exception: Couldn't find swig2.0 binary!

I suppose I need to install this swig2.0 binaryfor Windows 7, but I can’t understand how flawless it is. I went to the swig site that I found on Google and downloaded swigwin 2.0.12. The zip file comes pre-compiled swig.exe. I read the documentation for Windows, but I did not understand where I should put this file and how to continue working. I am new to python and I have never heard of swig before. Can someone please help me?

+4
source share
1 answer

I found that the problem: was swig.exenot in the Windows PATH variable. To fix this:

  • Unzip swigwinwherever you want.
  • Add the path to the directory where it swig.exeis located in Windows PATH.

To add a directory swig.exeto a PATH variable:

  • Launch the System Control Panel applet (Start - Settings - Control Panel - System).
  • Select the Advanced tab.
  • Click the "Environment Variables" button.
  • In the System Variables section, select Path and click Modify.
  • Put a ;and add the path to the directory in which it is located swig.exe to the end of the line.
+5
source

All Articles