简体   繁体   English

使用 Python 3.7 导入表格时遇到问题

[英]Trouble importing Tabulate with Python 3.7

I'm running Python 3.7 on Windows 10 and I keep getting No module named 'tabulate' error.我在 Windows 10 上运行 Python 3.7 并且我不断收到No module named 'tabulate'错误。 I have deleted Python 2.我已经删除了 Python 2。

I've tried everything suggested in a similar question :我已经尝试了类似问题中建议的所有内容:

>> pip install tabulate
>> pip3 install tabulate
>> python -m pip install tabulate

All of the above respond with以上所有回复

>> Successfully installed tabulate-0.8.6

If I try to run it again, I get如果我再次尝试运行它,我会得到

>> Requirement already satisfied: tabulate in c:\program files\python37\lib\site-packages (0.8.6)

But I keep getting the same ModuleNotFoundError when I try to import it.但是当我尝试导入它时,我一直收到相同的ModuleNotFoundError What can I try still?我还能尝试什么?

UPD:更新:

I have double-checked whether old versions of Python were uninstalled, and to my surprise EVERYTHING was still there: the folders, the files, the paths in the PATH... I'm afraid that was the reason of my problems, but I won't be able to test it until later.我已经仔细检查了旧版本的 Python 是否被卸载,令我惊讶的是一切都还在那里:文件夹、文件、PATH 中的路径......恐怕这是我的问题的原因,但我直到以后才能测试它。

我通过使用以下方法将表格更新到最新版本解决了这个问题:

pip install --upgrade tabulate

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM