Bug #7670

No module named 'nml'

Added by Matt about 5 years ago. Updated about 5 years ago.

Status:NewStart date:2015-05-19
Priority:HighDue date:
Assignee:-% Done:


Category:build system
Target version:-


So I updated python3, updated nml, disabled the broken make docs (see #7669) but it still fails to build for me

[NML] ogfx1_base.grf
Traceback (most recent call last):
File "/usr/bin/nmlc", line 9, in <module>
load_entry_point('nml==0.4.1', 'console_scripts', 'nmlc')()
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 552, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2672, in load_entry_point
return ep.load()
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2345, in load
return self.resolve()
File "/usr/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2351, in resolve
module = import(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named 'nml'

Is this Python 2 and Python 3 conflicting?


#1 Updated by frosch about 5 years ago

There is no python2 involved in any of NML or OpenGFX.

The first line of nmlc reads

#! /usr/bin/env python3

Does at least

nmlc --version

print something useful for you?

For me it says:

Library versions encountered:
PIL: 1.1.7
PLY: 3.4

#2 Updated by Matt about 5 years ago

No, same exception. Also tried the previous wrapper script.

[ 46s] + nmlc --version
[ 46s] Traceback (most recent call last):
[ 46s] File "/usr/bin/nmlc", line 3, in <module>
[ 46s] from nml import main
[ 46s] ImportError: No module named 'nml'

I noted that nml now installs to /usr/lib(64)/python not /usr/lib/python anymore. Maybe OpenGFX is looking in the wrong space.

#3 Updated by frosch about 5 years ago

The install location is defined by your python package.
Neither NML nor OpenGFX make any defintions or assumptions there.

Either the NML installation did not work, or your complete python3 installation is broken.

What does

python3 -v `which nmlc` --version

tell you?

Do you have any other python3 software that works?
Maybe run

from PIL import Image

Also available in: Atom PDF