简体   繁体   English

无法在 python 3.7.0 上导入 ijson 模块

[英]Can't import ijson module on python 3.7.0

I have installed python 3.7.0 and my installation directory is AppData\\Local\\Programs\\Python\\Python37-32我已经安装了python 3.7.0,我的安装目录是AppData\\Local\\Programs\\Python\\Python37-32

Now I have tried to upgrade pip with: python -m pip install –upgrade pip'现在我尝试使用以下命令升级 pip:python -m pip install –upgrade pip'

and I got: Successfully installed pip-19.0.3我得到:成功安装 pip-19.0.3

I did pip install ijson(while I was in folder AppData\\Local\\Programs\\Python\\Python37-32\\Scripts) and double checked with the result being:我做了 pip install ijson(当我在文件夹 AppData\\Local\\Programs\\Python\\Python37-32\\Scripts 中)并仔细检查结果是:

Requirement already satisfied: ijson in c:\\users\\myusername\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages (2.3)要求已经满足: ijson in c:\\users\\myusername\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages (2.3)

But when I go to my PyCharm project and I import ijson it can't find the module.Just to be clear if I import json or any other module I can work with it.但是当我转到我的 PyCharm 项目并导入 ijson 时,它找不到模块。只是要清楚我是否导入 json 或任何其他我可以使用它的模块。

I know this has some duplicates and I have seen some of them.我知道这有一些重复,我见过其中一些。 I have tried everything for example on these and others.我已经尝试了一切,例如在这些和其他上。 Just for reference ( possible duplicate )( possible dublicate 2 )仅供参考( 可能重复)( 可能重复2

but I haven't been able to solve my issue.但我一直无法解决我的问题。 Please tell me if I am missing something, maybe it is connected to the interpreter I am using or a wrong installion of python.如果我遗漏了什么,请告诉我,也许它连接到我正在使用的解释器或 python 的错误安装。

Thank you in advance先感谢您

Make sure the python interpreter you are using in Pycharm is the one where you install ijson via pip.确保你在 Pycharm 中使用的 python 解释器是你通过 pip 安装 ijson 的那个。

You can do this by looking at the interpreter path in PyCharm, then opening that path in your terminal and trying import ijson您可以通过查看 PyCharm 中的解释器路径,然后在终端中打开该路径并尝试import ijson

Also make sure the pip you are using is connected to the python interpreter you are using in PyCharm还要确保您使用的 pip 已连接到您在 PyCharm 中使用的 python 解释器

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

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