python - 尝试导入已安装的 python 模块接收错误
问题描述
我是 python 新手,所以这可能是一个简单的修复,但我无法通过谷歌搜索找到解决方案。尝试在模块上运行导入时出现此错误。
Traceback (most recent call last):
File "c:/Users/joeshmo/OneDrive - company Industries/Documents/Python/Excel Join/join.py", line 1, in <module>
from openpyxl import load_workbook
ModuleNotFoundError: No module named 'openpyxl'
Openpyxl 已经安装,因为 pip 给了我这个......
pip install openpyxl
Requirement already satisfied: openpyxl in c:\users\joeshmo\appdata\local\programs\python\python38-32\lib\site-packages (3.0.5)
Requirement already satisfied: jdcal in c:\users\joeshmo\appdata\local\programs\python\python38-32\lib\site-packages (from openpyxl) (1.4.1)
Requirement already satisfied: et-xmlfile in c:\users\joeshmo\appdata\local\programs\python\python38-32\lib\site-packages (from openpyxl) (1.0.1)
Python安装在这里...
C:\Users\joeshmo\AppData\Local\Programs\Python\Python38-32
Python路径在这里...
C:\Users\joeshmo\AppData\Local\Programs\Python\Python38-32\python38.zip
C:\Users\joeshmo\AppData\Local\Programs\Python\Python38-32\DLLs
C:\Users\joeshmo\AppData\Local\Programs\Python\Python38-32\lib
C:\Users\joeshmo\AppData\Local\Programs\Python\Python38-32
C:\Users\joeshmo\AppData\Roaming\Python\Python38\site-packages
C:\Users\joeshmo\AppData\Local\Programs\Python\Python38-32\lib\site-packages
在 Windows 10 上。
任何帮助,将不胜感激!
解决方案
在与同事进行故障排除后,我们发现我运行了 2 个版本的 python。我可以运行“py”(3.8.0)或“python”(3.8.5)。卸载旧版本后。这不再是一个问题。
推荐阅读
- workflow - 如何在 AEM 中等待大坝更新资产工作流程完成
- c++ - 静态方法/变量的内存布局
- sql-server - Azure 数据工厂无法执行复制数据任务到 SQL Server
- css - CSS网格 - 从每个开始的自动高度开始所有的coumns
- javascript - 错误:无法注册层:ApplyLayer 退出状态 1 标准输出:标准错误:lchown /git-2.9.3/git-gui/version:无效参数
- javascript - Css悬停动画闪烁/循环
- javascript - 如何制作一个同时上升和下降的循环?
- apache - 如何启用 mod_xsendfile?
- sharepoint - 权限请求未显示在管理员中
- spring - 在 Spring Boot 中运行 mongo 工具