python - 为什么会出错?%1 不是有效的 Win32 应用程序
问题描述
我正在尝试运行一个简单的程序,但出现以下错误。我在 PyCharm、Python 3.8 和 Windows 上运行它。如果我不导入 Pandas,代码运行不会出错。
import pandas
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi('PyCharm')
Traceback (most recent call last):
File "C:/Users/pmodi/Documents/Python3/Trial123/main.py", line 1, in <module>
import pandas
File "C:\Users\pmodi\AppData\Roaming\Python\Python38\site-packages\pandas\__init__.py", line 11, in <module>
__import__(dependency)
File "C:\Users\pmodi\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py", line 138, in <module>
from . import _distributor_init
File "C:\Users\pmodi\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py", line 26, in <module>
WinDLL(os.path.abspath(filename))
File "C:\Users\pmodi\Anaconda3\envs\Trial123\lib\ctypes\__init__.py", line 373, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application
Process finished with exit code 1
解决方案
推荐阅读
- video-processing - 如何在视频上叠加图像
- python - 如何使用 imap-tools 移动电子邮件
- ruby-on-rails - ActiveRecord::NotNullViolation (SQLite3::ConstraintException: NOT NULL 约束失败:
- google-chrome - 在 Chrome 中使用 swagger 和 Blazor WebAssembly
- javascript - 量角器 - MacO 上的 Microsoft Edge(无法自动化)
- angular - 第一次以角度与httpClient进行数据绑定很慢
- java - 春天:java.lang.NoSuchFieldError:IMPORT_BEAN_NAME_GENERATOR
- reactjs - 在heroku上部署react.js项目时出现应用程序错误
- c++ - std::getline 不在 while 循环中重新请求用户输入
- visual-studio - 如何更改 Visual Studio 文件选项卡视图