Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I get python import to work correctly when launching it using CreateProcess?
    primarykey
    data
    text
    <p>I'm having trouble getting the python interpreter to behave well when it's launched from a windows API call to CreateProcess. I'm using Windows 7, Python 2.7.1. My script (pt00.py) has a single executable line</p> <p>import numpy</p> <p>It behaves correctly when launched from the command line (DOS Box). However, when launched using CreateProcess and the same command line it generates the following error message.</p> <p>Traceback (most recent call last): File "c:\junk\pt00.py", line 2, in </p> <p>File "F:\Python27\lib\site-packages\numpy__init__.py", line 143, in import add_newdocs</p> <p>File "F:\Python27\lib\site-packages\numpy\add_newdocs.py", line 9, in from numpy.lib import add_newdoc</p> <p>File "F:\Python27\lib\site-packages\numpy\lib__init__.py", line 13, in from polynomial import *</p> <p>File "F:\Python27\lib\site-packages\numpy\lib\polynomial.py", line 17, in from numpy.linalg import eigvals, lstsq</p> <p>File "F:\Python27\lib\site-packages\numpy\linalg__init__.py", line 48, in from linalg import *</p> <p>File "F:\Python27\lib\site-packages\numpy\linalg\linalg.py", line 23, in from numpy.linalg import lapack_lite</p> <p>ImportError: DLL load failed: The specified module could not be found.</p> <blockquote> <blockquote> <p>></p> </blockquote> </blockquote> <p>Importing sys and os seem to work correctly, but they're more "built in" than numpy. As far as I can tell the environment is the same for the two cases. The current working directory (os.getcwd()), the path environmental variable (os.environ['Path']) and the pythonic path (sys.path) are identical. In neither case is PYTHONPATH or PYTHONHOME set in the environment. Ideas on how to make the CreateProcess version work would be appreciated. Where should I look to see what makes the two situations different?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload