I've had some luck resolving the "no module named numpy", "cannot import
name <blah>" type of errors. All cases are exemplified by this example ...
The file Python2.7/tempfile.py is attempting to "import random" from the
Standard Library but instead is importing the one from Numpy
(numpy.random). Fixes included re-writing how Python imports random,
adding hooks and so on. The two PyInstaller hooks for scipy helped too.
One set of programs work for both virtualenv and outside of it on linux64
and win32.
I'm now stuck on the second set of programs and the current issue
(AttributeError: 'module' object has no attribute 'BufferedIOBase') which
is proving difficult to solve. A Traceback is attached and would
appreciate any pointers. Thx!
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
import io.matlab.mio5_utils # dynamically loaded from
/tmp/_MEIvgWB6o/io.matlab.mio5_utils.so
Traceback (most recent call last):
File "<string>", line 9, in <module>
File
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py",
line 404, in load_module
module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
File "myserver.pyx", line 25, in init myserver
(//home//ubuntu//Programs//myproject//myproject_pyx/myserver.c:2859)
File
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py",
line 404, in load_module
module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
File "myresult.pyx", line 19, in init myresult
(//home//ubuntu//Programs//myproject//myproject_pyx/myresult.c:8157)
File
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py",
line 404, in load_module
module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
File "mydata.pyx", line 64, in init mydata
(//home//ubuntu//Programs//myproject//myproject_pyx/mydata.c:3748)
File
"//home//ubuntu//Programs//myproject//myproject_pi2/build/pyi.linux2/myproject_bs/out00-PYZ.pyz/numpy.lib.npyio",
line 354, in load
File
"/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/pyi_importers.py",
line 268, in load_module
exec(bytecode, module.__dict__)
File
"//home//ubuntu//Programs//myproject//myproject_pi2/build/pyi.linux2/myproject_bs/out00-PYZ.pyz/gzip",
line 36, in <module>
AttributeError: 'module' object has no attribute 'BufferedIOBase'
# clear __builtin__._
Notes:
a)
/numpy.lib.npyio
ln354:
import gzip
b)
gzip from Python Standard Library
ln36:
class GzipFile(io.BufferedIOBase):