Import missing despite already downloaded Python.

huangapple go评论55阅读模式
英文:

Import missing despite already downloaded Python

问题

我明白这是一个初学者的问题,我刚刚开始。我正在尝试为一个简单的货币转换应用程序实现实时货币变化。
代码

我下载了forex_python.converter,但它显示为缺失。是不是下载到了错误的文件?谢谢你的帮助。

英文:

I realize this is a beginner question, I'm just starting out. I'm trying to put real time currency changes for a simple currency converter app.
Code

I download forex_python.converter and it marks it as missing. Is it going to the wrong file? Thank you for helping.

答案1

得分: 1

你的计算机上安装了多个Python版本。在你的截图中,当你运行pip3 install forex-python时,你会看到它正在安装到一个位置C:\python311\lib\site-packages。但是在你的交互式开发环境(IDE)中,你正在引用不同的Python版本"3.10.11"。请在你的IDE环境设置中更改Python解释器,使其指向正确的位置,然后它将正确地注册该库。请参考微软文档此处了解如何在Visual Studio Code中配置Python环境。

英文:

You have multiple python versions installed on your machine. When you call pip3 install forex-python in your screenshot, you see that it is installing in a location C:\python311\lib\site-packages. But in your Interactive Development Environment (IDE) you are referencing a different python version "3.10.11". Change your python interpreter in your IDE environment settings to point to the correct location and it will register the library correctly. See the Microsoft Documentation here for how to configure python environments in Visual Studio Code.

huangapple
  • 本文由 发表于 2023年7月11日 00:53:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/76655833.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定