Numpy package does not work with morepy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Panda3D |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
With panda 1.8.0 on mac OSX 10.6 and Windows 7, the "numpy" package does not work if also using "morepy". I have not tried any other setups. The runtime downloads it, but "import numpy" at runtime produces:
File "VFSImporter", line 446, in load_module
ImportError
The traceback continues up into my code to the line that calls "import numpy".
Side note: Thats not very detailed for an ImportError. I think the nice description is getting lost somewhere.
Side note 2: When you remove morepy so this demo runs, the runtime locks the CPU at 100% use instead of exiting, which is a pain on windows since the process does not show in the task bar, you need to kill it with the tack manager.
Trivial example:
main.py:
import numpy
n.pdef:
class n(p3d):
require(
mainModule(
Output (Mac):
CraigsBook:
:AppRunner: Total Panda3D disk space used: 397 MB
:AppRunner: Configured max usage is: 2048 MB
:Packager: Reading n.pdef
Generating n.p3d
CraigsBook:
:AppRunner: Total Panda3D disk space used: 397 MB
:AppRunner: Configured max usage is: 2048 MB
Traceback (most recent call last):
File "/Users/
File "/Users/
File "/Users/
File "VFSImporter", line 153, in load_module
File "/Users/
import numpy
File "VFSImporter", line 446, in load_module
ImportError
:task(error): Exception occurred in PythonTask Messenger-default
Traceback (most recent call last):
File "/Users/
File "/Users/
File "/Users/
File "/Users/
File "/Users/
File "/Users/
File "VFSImporter", line 153, in load_module
File "/Users/
import numpy
File "VFSImporter", line 446, in load_module
ImportError
Successfully joined thread: 0
Failure on startup.
This is caused by:
import unittest
If the "morepy" package is used.
In Numpy, __init_ _.py
from unittest import TestCase
causes the issue, which is in: numpy/testing/
Removing that import fixes the issue.
Also, numpy should be marked to depend on morepy, since it uses shutil (though only in one place)