Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failing to build Slycot on windows 7 using anaconda distro

I'm trying to build slycot, a python wrapper around the fortran library SLICOT. I'm using the anaconda python distribution Anaconda-2.0.1-Windows-x86_64 on a 64-bit windows 7.

The first naive python setup.py build command resulted in

NotImplementedError("Only MS compiler supported with gfortran on win64")

So far so good. After googling for a while, someone recommended simply commenting out the line in numpy. This seems to work. gfortran is called and all the libraries are compiled, but then it fails at linking with the following message

The command line is too long

It seems that listing all the *.o files generates a huge command string which can not be processed.

Any suggestions?

like image 968
P3trus Avatar asked Nov 11 '22 04:11

P3trus


1 Answers

If you are still having this problem, try upgrading to Anaconda-2.1.0. If that still fails and you are not tied to Python2, then install a Python3 environment using the Anaconda3-2.1.0-Windows-x86_64 distribution. Once I did that and a manual package install (steps below) I didn't get the "command line too long" error. I have Anaconda installed in C:\Anaconda - can't tell if that helped or not.

To manually install a package:

  1. Download the package you need (for me it was numpy).
  2. Extract to a directory (I used c:\temp).
  3. Fix gnu.py in the distutils\fcompiler subdirectory per instructions here.
  4. Exit any apps using python and kill any remaining python.exe processes with task manager; not doing this caused my first compile to fail.
  5. Open an Anaconda Command Prompt (a standard admin cmd.exe window will not work).
  6. If you have multiple environments, activate the correct one.
  7. Change to the directory you extracted your package to.
  8. Type python setup.py install
like image 153
cb4 Avatar answered Nov 14 '22 21:11

cb4