Python module numpy missing on clean PPA install.

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Python module numpy missing on clean PPA install.

Post by mlampert »

I installed a pristine Ubuntu vm (16.04.1 LTS) and immediately added freecad-daily PPA to it and installed it.

The moment I try to select the Path workbench I get a popup saying "No module named numpy" (all other WBs seem OK). Is this a known issue?

Other than that it works like a charm! Great work guys :)
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Python module numpy missing on clean PPA install.

Post by sgrogan »

Thanks mlabert! It seems FreeCAD has a hard runtime dependency, not addressed, to python-numpy now. Can you try the FEM WB in the same experiment? We need a doc update.

Code: Select all

sudo apt-get install python-numpy
should fix it.
EDIT: @chrisb, what's the situation on OSX?
"fight the good fight"
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Python module numpy missing on clean PPA install.

Post by mlampert »

I did start the FEM WB and it was good - is there anything I should run in the WB ?
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: Python module numpy missing on clean PPA install.

Post by chrisb »

I can select Path WB and FEM WB without problems. Tiny test in PathWB worked, no idea how or what to test in FEM WB.

OS: Mac OS X
Version: 0.17.8443 (Git)
OCC version: 7.0.0
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Python module numpy missing on clean PPA install.

Post by sgrogan »

mlampert wrote:I did start the FEM WB and it was good - is there anything I should run in the WB ?
chrisb wrote:I can select Path WB and FEM WB without problems. Tiny test in PathWB worked, no idea how or what to test in FEM WB.
I'm not sure how to test :oops: I did discern this

Code: Select all

  C:\Users\Chris\GitHub\FreeCAD\src\Mod\Arch\Dice3DS\dom3ds.py (1 hit)
	Line 21: import numpy
  C:\Users\Chris\GitHub\FreeCAD\src\Mod\Arch\Dice3DS\util.py (1 hit)
	Line 9: import numpy
  C:\Users\Chris\GitHub\FreeCAD\src\Mod\Fem\ccxFrdReader.py (1 hit)
	Line 29: import numpy as np
  C:\Users\Chris\GitHub\FreeCAD\src\Mod\Fem\_TaskPanelShowResult.py (1 hit)
	Line 30: import numpy as np
  C:\Users\Chris\GitHub\FreeCAD\src\Mod\PartDesign\WizardShaft\SegmentFunction.py (1 hit)
	Line 24: import numpy as np
  C:\Users\Chris\GitHub\FreeCAD\src\Mod\PartDesign\WizardShaft\Shaft.py (1 hit)
	Line 288:             import numpy as np
  C:\Users\Chris\GitHub\FreeCAD\src\Mod\Path\PathScripts\PathProfile.py (1 hit)
	Line 27: import numpy
It looks like PartDisign/WizardShaft has a try/except. I didn't check the others. I'll add python-numpy as a runtime dependency for the PPA, unless there are objections?

Slightly off topic. Can someone explain the OSX/Python environment. I don't see this dependency in Travis.
"fight the good fight"
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: Python module numpy missing on clean PPA install.

Post by chrisb »

I am not familiar with the python situation on OSX but numpy seems to be shipped with FreeCAD.
I can do the following in FreeCAD's python console and the result shows the shipped path:

Code: Select all

import numpy
>>> numpy.__path__
['/Users/cb/freeCAD/FreeCADDaily.app/Contents/lib/python2.7/site-packages/numpy']
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Python module numpy missing on clean PPA install.

Post by sgrogan »

chrisb wrote:I can do the following in FreeCAD's python console and the result shows the shipped path:
Thanks again chrisb! I think we need bblacey to explain, at least to me :o
"fight the good fight"
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Python module numpy missing on clean PPA install.

Post by NormandC »

Hello sgrogan,
sgrogan wrote:I'll add python-numpy as a runtime dependency for the PPA, unless there are objections?
This is probably off-topic, but I just noticed tonight that when doing File --> Open after a fresh launch of the freecad-daily package, it always opens in the /usr/lib/freecad-daily folder. It's pretty damn annoying. :?

OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8775 (Git)
Build type: None
Branch: master
Hash: 761d684c79afe4a5758e782bc4c4fb88864701a5
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: Python module numpy missing on clean PPA install.

Post by blacey »

sgrogan wrote:
chrisb wrote:I can do the following in FreeCAD's python console and the result shows the shipped path:
Thanks again chrisb! I think we need bblacey to explain, at least to me :o
FreeCAD on macOS / OS X is installed with the following dependencies, including python-numpy.

Code: Select all

[blacey@mbp ~]$ brew deps --include-build freecad
FreeCAD/freecad/coin
FreeCAD/freecad/med-file
FreeCAD/freecad/nglib
FreeCAD/freecad/pivy
FreeCAD/freecad/pyside
FreeCAD/freecad/pyside-tools
FreeCAD/freecad/shiboken
autoconf
automake
boost
boost-python
ccache
cmake
cppunit
eigen
fontconfig
freeimage
freetype
gcc
gdbm
git
gl2ps
hdf5
homebrew/python/matplotlib
homebrew/python/numpy
homebrew/science/hdf5
homebrew/science/opencascade
homebrew/science/orocos-kdl
homebrew/science/vtk
jpeg
libpng
libtiff
libtool
makedepend
opencascade
openssl
pcre
pkg-config
python
qt
readline
sphinx-doc
sqlite
swig
szip
tbb
xerces-c
Relevant log section from Travis build...
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Python module numpy missing on clean PPA install.

Post by sgrogan »

blacey wrote:FreeCAD on macOS / OS X is installed with the following dependencies, including python-numpy.
Thanks, got it now, I had only looked at the travis.yaml. I'll look at the self tests. I thought all workbenches were loaded and this should have produced a failure on linux Travis.
"fight the good fight"
Post Reply