[英]ImprtError when importing wxPython from Python3.7
Traceback (most recent call last): File "C:/Users/STEVE/Desktop/Python Files/Chat Bot/Joyla/joyla.py", line 3, in import wx File "C:\\Users\\STEVE\\AppData\\Local\\Programs\\Python\\Python37-32\\lib\\site-packages\\wx__init__.py", line 17, in from wx.core import * File "C:\\Users\\STEVE\\AppData\\Local\\Programs\\Python\\Python37-32\\lib\\site-packages\\wx\\core.py", line 12, in from ._core import * ImportError: DLL load failed: The specified module could not be found.
追溯(最近一次通话):文件“ C:/ Users / STEVE / Desktop / Python Files / Chat Bot / Joyla / joyla.py”,导入wx文件的第3行,文件“ C:\\ Users \\ STEVE \\ AppData \\ Local” \\ Programs \\ Python \\ Python37-32 \\ lib \\ site-packages \\ wx__init __。py“,第17行,从wx.core导入*文件“ C:\\ Users \\ STEVE \\ AppData \\ Local \\ Programs \\ Python \\ Python37-32” \\ lib \\ site-packages \\ wx \\ core.py“,第12行,来自._core import * ImportError:DLL加载失败:找不到指定的模块。
I had this same problem with the same exact error message. 我在相同的错误消息中也遇到了同样的问题。 It turned out that I have mistakenly installed the 32 bit version of python instead of the 64 bit version.
原来,我错误地安装了32位版本的python,而不是64位版本。
The python web site will trick you - if you just use the download link on the top page it will give you the 32 bit version. python网站会欺骗您-如果仅使用首页上的下载链接,它将为您提供32位版本。 You have to go to the downloads page, then windows, then look for the 64 bit version - "Windows x86-64 executable installer".
您必须转到下载页面,然后是Windows,然后找到64位版本-“ Windows x86-64可执行安装程序”。 The actual file name of the 64 bit download is "python-3.7.0-amd64.exe".
64位下载的实际文件名为“ python-3.7.0-amd64.exe”。 If you get the 32 bit version the file name will be "python-3.7.0.exe".
如果获得32位版本,则文件名将为“ python-3.7.0.exe”。
Another way to check, after installing, is to open a python console (or a command prompt and type "python" to open the python command line). 安装后检查的另一种方法是打开python控制台(或命令提示符并键入“ python”以打开python命令行)。 If you have the 32 bit version it will say: Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
如果您拥有32位版本,它将在Win32上显示:Python 3.7.0(v3.7.0:1bf9cc5093,Jun 27 2018,04:06:47)[MSC v.1914 32位(Intel)]
If you have the 64 bit version it will say: Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 如果您使用的是64位版本,则会在Win32上显示Python 3.7.0(v3.7.0:1bf9cc5093,Jun 27 2018,04:59:51)[MSC v.1914 64位(AMD64)]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.