Adding Python modules to FreeCAD 0.17

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
MarkkuTM
Posts: 33
Joined: Sun Dec 31, 2017 6:57 pm

Adding Python modules to FreeCAD 0.17

Post by MarkkuTM »

I have tried to pip install pandas (and its dependencies) to Python in FreeCAD 0.17, but cannot do it, with error messages mentioning permissions. I can provide more details about my failed attempts if this is needed. Does anyone have a working method to achieve this?

(I can pip install pandas and make it work in Python 3.6 which is not associated with FreeCAD)

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13515 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: e17b340949b75a226cc7d89989b0aa238ccfc75f
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
User avatar
Gift
Posts: 769
Joined: Tue Aug 18, 2015 10:08 am
Location: Germany, Sauerland

Re: Adding Python modules to FreeCAD 0.17

Post by Gift »

Hello Markku,

it is not possible to use native packages of pip. Because the compilers are not compatible(diff versions). Please use the FreeCAD-Conda-Version e.g. FreeCAD_0.18.15643_Conda_Py3QT5-WinVS2015_x64.7z. https://github.com/FreeCAD/FreeCAD/releases
MarkkuTM
Posts: 33
Joined: Sun Dec 31, 2017 6:57 pm

Re: Adding Python modules to FreeCAD 0.17

Post by MarkkuTM »

Thank you. This solved my problem, and I can stop pulling my hair. I was able to pip install pandas from CMD. It seems all the dependencies (numpy, dateutil, pytz, and six) are already included in the FreeCAD 0.18 build I downloaded (FreeCAD_0.18.15646_Conda_Py3QT5-WinVS2015_x64.7z).

I did a quick check of pandas functionality in the FreeCAD 0.18 Pre Python console, everything seems to work. (I also followed the instructions in https://forum.freecadweb.org/viewtopic. ... 4&start=20 on how to import pip functionality into the python console and the examples of how to use it there, and it works, though to install a python package or module I think you have to run FreeCAD.exe as administrator.)

Now its time to develop my scripts.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Adding Python modules to FreeCAD 0.17

Post by triplus »

Post Reply