pip-integration in addon-manager
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: pip-integration in addon-manager
I also think it's not the best way to do it only for FreeCAD. I guess we should modify the path for python directly. Found this: https://stackoverflow.com/questions/114 ... tup-script . So we can add some content to python/site-packages/site-customize.py.
Maybe conda does all the path modification in the activation step...
Maybe conda does all the path modification in the activation step...
Re: pip-integration in addon-manager
tested, works:
simple add a file bin/lib/sitepackages/sitecustomize.py with this content:
and the problems for calling pip are gone.
edit: we also need to add the path to the user Scripts directory.
simple add a file bin/lib/sitepackages/sitecustomize.py with this content:
Code: Select all
import os
import site
scripts_path = os.path.join(os.path.dirname(__file__), "..", "..", "Scripts") + ";"
scripts_path += os.path.join(site.USER_SITE, "..", "Scripts") + ";"
os.environ["PATH"] += scripts_path
edit: we also need to add the path to the user Scripts directory.
Re: pip-integration in addon-manager
feel free to try the pip integration tools. I added a description how to install with freecad console (assuming pip is directly available):
https://github.com/looooo/freecad_pipin ... on-console
https://github.com/looooo/freecad_pipin ... on-console
Re: pip-integration in addon-manager
PR to tweak the README: https://github.com/looooo/freecad_pipintegration/pull/4
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: pip-integration in addon-manager
What can be installed via pip?
Code: Select all
OpenFOAM ?
Fenics ?
CalculiX X
Elmer X
Graphiz X
Gdal ✓
ezdxf ✓
opencv ?
cv2 ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: pip-integration in addon-manager
"fight the good fight"
Re: pip-integration in addon-manager
I actually have some errors:
After following the instructions from https://github.com/looooo/freecad_pipin ... on-console I see the following in the Report window:
OS: "Manjaro Linux"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14784 (Git) AppImage
Build type: Release
Branch: master
Hash: ac21bcc35c56b360e03c646f5cfdcf15e5769717
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
I guess I'm not running the Py3 with this appimage
After following the instructions from https://github.com/looooo/freecad_pipin ... on-console I see the following in the Report window:
Code: Select all
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007ff87cb71740 (most recent call first):
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14784 (Git) AppImage
Build type: Release
Branch: master
Hash: ac21bcc35c56b360e03c646f5cfdcf15e5769717
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
I guess I'm not running the Py3 with this appimage
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: pip-integration in addon-manager
I actually have some errors:
After following the instructions from https://github.com/looooo/freecad_pipin ... on-console I see the following in the Report window:
OS: "Manjaro Linux"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14784 (Git) AppImage
Build type: Release
Branch: master
Hash: ac21bcc35c56b360e03c646f5cfdcf15e5769717
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
I guess I'm not running the Py3 with this appimage
After following the instructions from https://github.com/looooo/freecad_pipin ... on-console I see the following in the Report window:
Code: Select all
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007ff87cb71740 (most recent call first):
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14784 (Git) AppImage
Build type: Release
Branch: master
Hash: ac21bcc35c56b360e03c646f5cfdcf15e5769717
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
I guess I'm not running the Py3 with this appimage
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: pip-integration in addon-manager
Actually the 0.18-pre PY2 Win x64 have all the needed pip stuff. easyw-fc showed me how to make it work. It's not advertised because of the compiled extension limitations, but for pure python it's useful.
OSX has used pip for stuff like yaml for a while now with Py2.
For the Win portable builds and the AppImages, we should consider including this including your pip-integration work. This would allow to lighten the binary packages. If it's easy for the user to get the stuff into the right environment we (FreeCAD) don't need to provide it.
What does everyone think?
"fight the good fight"