FreeCAD 0.16 with numpy and scipy in windows?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
FreeCAD 0.16 with numpy and scipy in windows?
The root of this question is twofold:
1. I work on a FreeCAD interface for an optical raytracer written in Python. The optimization of the raytracer needs scipy. In Linux this is usually no problem, but in windows it is.
2. For more sophisticated scientific calculations, it would be nice to have an interface to scipy on-board in FreeCAD.
My question is: Is it possible to get scipy running together with FreeCAD 0.16 in windows 64 (but on a userspace level, without recompiling)? My second question is: Is it possible that you guys ship the future precompiled windows binaries with scipy support?
The goal is to have full scipy support after a quick setup in windows to get users more attracted to the project.
Btw: How is it decided which modules are shipped with FreeCAD's Python?
Best wishes
Johannes
1. I work on a FreeCAD interface for an optical raytracer written in Python. The optimization of the raytracer needs scipy. In Linux this is usually no problem, but in windows it is.
2. For more sophisticated scientific calculations, it would be nice to have an interface to scipy on-board in FreeCAD.
My question is: Is it possible to get scipy running together with FreeCAD 0.16 in windows 64 (but on a userspace level, without recompiling)? My second question is: Is it possible that you guys ship the future precompiled windows binaries with scipy support?
The goal is to have full scipy support after a quick setup in windows to get users more attracted to the project.
Btw: How is it decided which modules are shipped with FreeCAD's Python?
Best wishes
Johannes
Re: FreeCAD 0.16 with numpy and scipy in windows?
Not that I know of. The trouble is fortran. The windows builds are compiled with Visual Studio 2013, and the only fortran compiler that works with VS is the expensive Intel compiler (as far as I know).joha2 wrote:Is it possible to get scipy running together with FreeCAD 0.16 in windows 64
Yes, but it won't be for a few months. There is an on going effort to add Python 3 support to FreeCAD. Once that is completed, we will be able to use the precompiled scipy/numpy provided by Anaconda.joha2 wrote:Is it possible that you guys ship the future precompiled windows binaries with scipy support
So far it has just been what is used by the workbenches shipped with FreeCAD.joha2 wrote:How is it decided which modules are shipped with FreeCAD's Python?
Again, this situation will improve once python 3 is here because freecad can use the same version of visual studio as the official python (only needed for non python-only libraries).
Re: FreeCAD 0.16 with numpy and scipy in windows?
Hello Peter, actually for 0.16 this should be possible if you can compile x64 with VC9 (I could never get the hack to work with VS2008 Express)peterl94 wrote:Not that I know of.
Then I think these packages should work. http://www.lfd.uci.edu/~gohlke/pythonlibs/
But for 0.17 until we have Python3 and VS2015 libpacks we're stuck.
BTW: We do have NumPy thanks to Peter already.
"fight the good fight"
Re: FreeCAD 0.16 with numpy and scipy in windows?
True, but that is too much work. It seems like if people really needed to use scipy with freecad on windows, they could install 0.16 32bit.
Re: FreeCAD 0.16 with numpy and scipy in windows?
+1 Any and all efforts should be directed at FreeCAD 0.17, VC14, QT5, OCCT 7.x, VTK 7.x, Pyside2, nglib 6.2+, etc.peterl94 wrote:True, but that is too much work. It seems like if people really needed to use scipy with freecad on windows, they could install 0.16 32bit.
"fight the good fight"
Re: FreeCAD 0.16 with numpy and scipy in windows?
Thank you guys for all the answers! Could you tell me where to get the appropriate scipy binary for FC 0.16 32 bit? I want to add it to some install notes on our git repo.peterl94 wrote:True, but that is too much work. It seems like if people really needed to use scipy with freecad on windows, they could install 0.16 32bit.
Best wishes
Johannes
Re: FreeCAD 0.16 with numpy and scipy in windows?
Download numpy‑1.12.0+mkl‑cp27‑cp27m‑win32.whl and scipy‑0.18.1‑cp27‑cp27m‑win32.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/joha2 wrote:Could you tell me where to get the appropriate scipy binary for FC 0.16 32 bit?
To install:
1. Delete (or rename) C:\Program Files (x86)\FreeCAD 0.16\bin\Lib\site-packages\numpy
2. Use 7-zip to extract numpy‑1.12.0+mkl‑cp27‑cp27m‑win32.whl\numpy to C:\Program Files (x86)\FreeCAD 0.16\bin\Lib\site-packages
3. Use 7-zip to extract scipy‑0.18.1‑cp27‑cp27m‑win32.whl\scipy to C:\Program Files (x86)\FreeCAD 0.16\bin\Lib\site-packages
I'm sure there has to be a way to do it with pip, but I didn't spend the time to figure it out.
Re: FreeCAD 0.16 with numpy and scipy in windows?
@Peterl94, probably replace matplotlib also?peterl94 wrote: Download numpy‑1.12.0+mkl‑cp27‑cp27m‑win32.whl and scipy‑0.18.1‑cp27‑cp27m‑win32.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/
"fight the good fight"
Re: FreeCAD 0.16 with numpy and scipy in windows?
I think you would only need to do that if the older version of matplotlib uses an API that is not in numpy 1.12. I haven't tested that.
Edit: Just tried a simple test, and matplotlib seemed to work fine.
Edit: Just tried a simple test, and matplotlib seemed to work fine.
Re: FreeCAD 0.16 with numpy and scipy in windows?
Thanks guys. For win32 it worked and I integrated your installation procedure into our README.md file.
Best wishes
Johannes
Best wishes
Johannes