[英]Python on Windows error: python25.dll not found
I am running Python 2.7 on Windows 7 (on parallels on a Mac running Mountain Lion) and getting a strange error. 我在Windows 7上运行Python 2.7(在运行Mountain Lion的Mac上并行运行),并收到一个奇怪的错误。 It has happened both using Python(x,y) and the Enthought Python Distribution (paid version - 64-bit).
使用Python(x,y)和Enthought Python发行版(付费版本-64位)都发生了这种情况。
Running python from the command line initially works fine (and always does after rebooting the machine). 从命令行运行python最初可以正常运行(并且在重新启动计算机后始终可以运行)。
But, when I try to run my code at the command line as 但是,当我尝试在命令行上运行我的代码时
python the_script.py
On the first try, I get this error window: 第一次尝试,我得到这个错误窗口:
After that, I get the same error just from typing python
at the command line. 之后,仅在命令行输入
python
就会得到相同的错误。
If I specify the path as c:\\python27\\python the_script.py
it works fine. 如果我将路径指定为
c:\\python27\\python the_script.py
它可以正常工作。
Here are all the modules I'm loading in my scripts: 这是我在脚本中加载的所有模块:
import numpy as np
import subprocess as sub
import parallel_condor_Jacobian as pcj
import os
import shutil
In parallel_condor_Jacobian
the following modules are loaded: 在
parallel_condor_Jacobian
,加载了以下模块:
import numpy as np
import os
import subprocess as sub
Nothing really out of the ordinary I think! 我认为没有什么异常的!
Is one of these packages somehow dependent on python25.dll? 这些软件包之一是否以某种方式依赖于python25.dll?
Fixes I have tried include totally removing python 2.7, reinstalling, and removing all python path stuff from my PATH environment variable and replacing them with c:\\python27. 我尝试的修复程序包括完全删除python 2.7,重新安装以及从PATH环境变量中删除所有python路径内容,然后将其替换为c:\\ python27。
I'm really at a loss here. 我真的很茫然。 Happy to provide more relevant information.
乐意提供更多相关信息。
删除本地文件夹中的python.exe ...并告诉您的同事至少升级到2.6:P,并告诉他们python exe不具有可移植性:P
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.