ImportError: No module named multiarray

2,005 views
Skip to first unread message

Lynn Oliver

unread,
May 2, 2012, 3:00:20 AM5/2/12
to pyins...@googlegroups.com
Using the dev version of pyinstaller from today, the program builds (onefile mode) and runs  on my Win7-64 machine.  When a tester loads it on his Win7-64 machine it fails to load.  I sent him a version with debug turned on, and the problem is ImportError: No module named multiarray.   The full output is below.  

I'm at a loss as to how to troubleshoot this since it works on my machine.  I know I was getting this error a while back with earlier versions of pyinstaller, but it has been working for several weeks now.

Any thoughts about what the problem might be?


_MEIPASS2 is NULL
archivename is C:\Users\jabelardo\Desktop\axeomatic.exe
Extracting binaries
Executing self as child with Setting up to run child
Creating child process
Waiting for child process to finish...
_MEIPASS2 is C:/Users/JABELA~1/AppData/Local/Temp/_MEI51122/
archivename is C:\Users\jabelardo\Desktop\axeomatic.exe
Already in the child - running!
manifestpath: C:/Users/JABELA~1/AppData/Local/Temp/_MEI51122/axeomatic.exe.manif
est
Activation context created
Activation context activated
C:/Users/JABELA~1/AppData/Local/Temp/_MEI51122/python27.dll
Manipulating evironment
PYTHONPATH=C:/Users/JABELA~1/AppData/Local/Temp/_MEI51122;C:/Users/jabelardo/Des
ktop
PYTHONHOME=C:/Users/JABELA~1/AppData/Local/Temp/_MEI51122/
importing modules from CArchive
extracted iu
extracted struct
extracted archive
Installing import hooks
out03-PYZ.pyz
Running scripts
Traceback (most recent call last):
  File "<string>", line 10, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 386, in importHook
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 480, in doimport
  File "..\aom2-remote\debug\build\pyi.win32\axeomatic\out03-PYZ.pyz\FileConvert
", line 5, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 386, in importHook
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 480, in doimport
  File "..\aom2-remote\debug\build\pyi.win32\axeomatic\out03-PYZ.pyz\AxeConvert"
, line 8, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 386, in importHook
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 480, in doimport
  File "..\aom2-remote\debug\build\pyi.win32\axeomatic\out03-PYZ.pyz\SysExWave",
 line 4, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 386, in importHook
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 480, in doimport
  File "..\aom2-remote\debug\build\pyi.win32\axeomatic\out03-PYZ.pyz\myUtils", l
ine 4, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 386, in importHook
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 480, in doimport
  File "..\aom2-remote\debug\build\pyi.win32\axeomatic\out03-PYZ.pyz\numpy", lin
e 143, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 386, in importHook
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 480, in doimport
  File "..\aom2-remote\debug\build\pyi.win32\axeomatic\out03-PYZ.pyz\numpy.add_n
ewdocs", line 9, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 386, in importHook
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 480, in doimport
  File "..\aom2-remote\debug\build\pyi.win32\axeomatic\out03-PYZ.pyz\numpy.lib",
 line 4, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 386, in importHook
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 480, in doimport
  File "..\aom2-remote\debug\build\pyi.win32\axeomatic\out03-PYZ.pyz\numpy.lib.t
ype_check", line 8, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 386, in importHook
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 480, in doimport
  File "..\aom2-remote\debug\build\pyi.win32\axeomatic\out03-PYZ.pyz\numpy.core"
, line 5, in <module>
  File "C:\Users\Lynn Oliver\Documents\Python\pyinstaller\PyInstaller\loader\iu.
py", line 409, in importHook
ImportError: No module named multiarray
RC: -1 from axeomatic
OK.
Deactivating activation context
Releasing activation context
Done
Back to parent...
Freeing status for C:\Users\jabelardo\Desktop\axeomatic.exe

Lynn Oliver

unread,
May 2, 2012, 3:06:41 PM5/2/12
to pyins...@googlegroups.com
Looked at this a bit more.  
1. Tried running the program on a clean install of windows (no multiarray files) and it works fine.
2. Built in onedir mode and confirmed that numpy.core.multiarray.so is included.
3. Ran ArchiveViewer on onefile mode and confirmed that numpy.core.multiarray.so is included.

What I'm left with is that on one machine I get the import error.  It happens that the machine is configured for German language, but I don't know why that would be relevant.

Any suggestions?

-Lynn

Begin forwarded message:

Martin Zibricky

unread,
May 2, 2012, 4:31:47 PM5/2/12
to pyins...@googlegroups.com
Lynn Oliver píše v St 02. 05. 2012 v 12:06 -0700:
> What I'm left with is that on one machine I get the import error. It
> happens that the machine is configured for German language, but I
> don't know why that would be relevant.
>
> Any suggestions?

German language could be relevant. See the following report:

http://www.pyinstaller.org/ticket/298

There is not easy solution for that issue yet.

Lynn Oliver

unread,
May 2, 2012, 4:45:39 PM5/2/12
to pyins...@googlegroups.com
Does sound like it could be related.
> --
> You received this message because you are subscribed to the Google Groups "PyInstaller" group.
> To post to this group, send email to pyins...@googlegroups.com.
> To unsubscribe from this group, send email to pyinstaller...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.
>

Martin Zibricky

unread,
Aug 27, 2012, 4:21:46 AM8/27/12
to pyins...@googlegroups.com
Hi, could you please create simple example using multiprocess module for
reproducing the issue easily?

It seems like more people reported this issue related to multiprocess.
And it's specific only to Windows platform.

Do you use --onefile or --onedir mode? Does it work at least in one of
them?

jj píše v Pá 24. 08. 2012 v 13:54 -0700:
> I didn't want to start a new thread because I'm having a similar issue
> but unrelated to the language-specific stuff below.
>
> Using the pyinstaller-2.0, Windows 7, Python 2.7, numpy 1.6.1:
>
> I don't receive the 'ImportError: No module named multiarray'
> on initialization of my GUI but when a multiprocessing method is
> called. If
> multiprocessing is deactivated the GUI works perfectly.
> numpy.core.multiarray.pyd is included in the dist folder as well as
> all the needed .dll files. The GUI also works perfectly on Mac with
> and without multiprocessing activated.
>
> Any help or ideas with this one would be greatly appreciated! Thanks
> in advance!

SK

unread,
Aug 27, 2012, 12:45:23 PM8/27/12
to pyins...@googlegroups.com
jj, it looks like I'm having the same issue. I had to roll back to PyInstaller 1.5.1 for now.

Martin, I am using --onedir and I never was able to use --onefile in the past. I also tried the current pyinstaller.git version. I'm happy to try out any ideas/patches to help get this fixed.

Thanks!

jj

unread,
Aug 27, 2012, 1:17:36 PM8/27/12
to pyins...@googlegroups.com
Martin, thanks for your response!  I actually looked at ticket #569 and replaced my Windows-32bit folder in the support/loader directory and it works now!

jj

unread,
Aug 27, 2012, 4:53:03 PM8/27/12
to pyins...@googlegroups.com
Here is the link for anyone with the same issue:

Martin Zibricky

unread,
Aug 29, 2012, 2:16:10 PM8/29/12
to pyins...@googlegroups.com
SK píše v Po 27. 08. 2012 v 09:45 -0700:
Please try latest dev version if its fixed or not yet.

Stuart Mentzer

unread,
Aug 29, 2012, 2:46:24 PM8/29/12
to pyins...@googlegroups.com
On 8/29/2012 2:16 PM, Martin Zibricky wrote:
> SK p�e v Po 27. 08. 2012 v 09:45 -0700:
It is working for me. Thanks for the quick fix!

Lynn

unread,
Nov 5, 2012, 5:55:46 PM11/5/12
to pyins...@googlegroups.com
This problem just reappeared today on my windows xp machine: ImportError: No module named multiarray

It happens in both onedir and onefile modes, and the file is present.  It happens with pyinstaller-2.0 as well as the most current dev version.

I don't know what I might have done to trigger the issue, but I have been adding unicode support to my program recently.

At the same time, the missing clapack.pyd problem reappeared, so once again I copied it into the appropriate directory.

Lynn Oliver

unread,
Nov 5, 2012, 10:38:23 PM11/5/12
to pyins...@googlegroups.com
Just to make sure I tried all the combinations, I went through them some of them again:

Pyinstaller dev version from earlier today
1. -onedir  with debug=True, console=True builds and runs.

2. -onefile with debug=True, console=True builds and runs.

3. -onefile with debug=True, console=False gave:
KeyError: 'PYI_PYTHON_LIBRARY_NAME'.  I set console back to true and got the same error.

4. back to config #2:
upx: C:\Documents and Settings\Lynn\Application Data\pyinstaller\bincache01_py27\clapack.pyd: IOException: rename error:  Permission denied
WindowsError: [Error 2] The system cannot find the file specified: 'C:\\Documents and Settings\\Lynn\\Application Data\\pyinstaller\\bincache01_py27\\clapack.pyd'

Pyinstaller-2.0
5. I restored the clapack.pyd file and tried #2 again:
ImportError: No module named multiarray

Pyinstaller dev version
6. Build -onedir debug=false (i.e. normal build) using python dev version, builds and runs.

I'm obviously having better luck with the dev version, but it seems to get weird errors as well. I did #6 several more times:
run 1:
upx: C:\Documents and Settings\Lynn\Application Data\pyinstaller\bincache01_py27\clapack.pyd: IOException: rename error:  Permission denied
WindowsError: [Error 2] The system cannot find the file specified: 'C:\\Documents and Settings\\Lynn\\Application Data\\pyinstaller\\bincache01_py27\\clapack.pyd'
KeyError: 'PYI_PYTHON_LIBRARY_NAME'

run 2: after restoring clapack.pyd, 
KeyError: 'PYI_PYTHON_LIBRARY_NAME'

run 3:
upx: C:\Documents and Settings\Lynn\Application Data\pyinstaller\bincache01_py27\clapack.pyd: IOException: rename error:  Permission denied
WindowsError: [Error 2] The system cannot find the file specified: 'C:\\Documents and Settings\\Lynn\\Application Data\\pyinstaller\\bincache01_py27\\clapack.pyd'

run 4, after restoring clapack.pyd:
KeyError: 'PYI_PYTHON_LIBRARY_NAME'

Not a single successful build after the first one.

Any idea why 2.0 quite working, or how to get the dev version to work more than once per type of build?

Lynn

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pyinstaller/-/2oLcSORr8fgJ.

Lynn

unread,
Nov 6, 2012, 2:17:08 AM11/6/12
to pyins...@googlegroups.com
Some more info...

I went back to snapshot of my windows xp vm that was several days old, and verified that building with pyinstaller-2.0 fails there as well (the sources are not kept on the windows vm).  Then I cloned the dev tree, made a snapshot of the vm, and tried building with the dev version of pyinstaller.  It worked the first time, and failed the second time.  It appears I can get one good build and then revert to the snapshot from before the build before doing another.

Hartmut Goebel

unread,
Nov 7, 2012, 2:30:05 PM11/7/12
to pyins...@googlegroups.com
Am 06.11.2012 08:17, schrieb Lynn:
It appears I can get one good build and then revert to the snapshot from before the build before doing another.
This sounds like a caching problem.

Could you please try removing %APPDATA%/pyinstaller prior to building the second time.


--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP

Goebel Consult
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/2011-02-fleisige-datensammler-fur-lukratives-geschaeftsmodell-gesucht
Blog: http://www.goebel-consult.de/blog/20060215

Goebel Consult ist Mitglied bei http://www.7-it.de/

Reply all
Reply to author
Forward
0 new messages