简体   繁体   English

找不到PyCharm模块

[英]PyCharm modules not found

I've been trying to import speech_recognition and pyttsx3. 我一直在尝试导入speech_recognition和pyttsx3。 However, I can't find the modules available to install when I go to File->Preferences for New Project->Project interpreter. 但是,当我转到“文件”->“新项目的首选项”->“项目解释器”时,找不到可供安装的模块。 I then installed it using pip in my terminal, but it didn't do anything in pycharm despite it being successful in the terminal. 然后,我在终端中使用pip安装了它,但是尽管在终端中成功了,但是它在pycharm中什么也没做。

I actually just had a very similar issue. 我实际上有一个非常相似的问题。 if you installed them sucessfully and can see that they appear in the terminal, then go to file -> settings -> Project Interpreter and from here click on the plus (+) icon on the right. 如果安装成功,并且可以看到它们出现在终端中,请转到文件->设置->项目解释器,然后从此处单击右侧的加号(+)图标。 You won't see the modules until you click the (+) icon. 单击(+)图标,您将看不到模块。 From there, simply search the modules and they should appear and give you the option to add them. 从那里,只需搜索模块,它们就会出现,并为您提供添加它们的选项。 This worked for me, so please let me know if it does for you too! 这对我有用,所以请让我知道是否也对您有用!

It sounds like you have an anaconda environment. 听起来您有anaconda环境。 To install packages to your python environment in anaconda, follow the documentation . 要将软件包安装到anaconda中的python环境中,请遵循文档

Basically try installing packages like conda install -n Abitt scipy . 基本上尝试安装像conda install -n Abitt scipy这样的软件包。 After installing the package, it should show up in your project interpreter settings. 安装软件包后,它将显示在项目解释器设置中。

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

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