简体   繁体   English

一个版本的 Python 出现模块未找到错误,但没有其他版本

[英]Module Not Found Error with one version of of Python, but no the other

I am using a VS Code (Linux Mint) plug-in for Python that allows me to choose between different interpreters.我正在使用 Python 的 VS Code (Linux Mint) 插件,它允许我在不同的解释器之间进行选择。

When I run my file with Python 3.8, I get an error saying that it can't find pandas I am trying to use, but when I switch the interpreter to Python 3.6 there is no issue finding pandas.当我使用 Python 3.8 运行我的文件时,我收到一条错误消息,说它找不到我正在尝试使用的 Pandas,但是当我将解释器切换到 Python 3.6 时,找到 Pandas 没有问题。

What's going on?这是怎么回事?

The module might not be updated for Python 3.8.该模块可能不会针对 Python 3.8 进行更新。 Search up the module's name from GitHub or where it can be imported from to see what versions they support.从 GitHub 或可以从何处导入模块的名称以查看它们支持的版本。

That module isn't installed for Python 3.8, simple as that.该模块没有为 Python 3.8 安装,就这么简单。 Different versions of Python have different libraries (listed under sys.path ) on Debian-based distros.不同版本的 Python 在基于 Debian 的发行版上有不同的库(列在sys.path下)。

Without knowing which module, it's hard to say much else, like whether it even supports 3.8, but to install it, you might be able to use apt or pip .在不知道哪个模块的情况下,很难说其他的,比如它是否甚至支持 3.8,但是要安装它,您可能可以使用aptpip

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

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