FW: pip Error
Mats Wichmann
mats at wichmann.us
Sat Dec 11 12:51:15 EST 2021
On 12/11/21 00:35, Sidharth S Nair wrote:
> Hi, I am NINJAGAMING107 a active python user and lately I have been trying
> to make my own personal AI assistant but I am not able to make because I
> am not able to import Speech Recognition and some other more. The error
> says module not found even though in my folder where I installed python
> and the packages there is a folder of speech recognition and the rest of
> the things which I installed. I used Pycharm and VS code for this still
> not working. If there is any way to fix this please tell me or if I am
> doing the installation wrong please tell me. Hope that you will reply to
> ASAP.
Rule #1 on module not found errors: it's always a path problem.
Unfortunately, on today's systems, there are often many places things
can go as you may have several Pythons, several virtualenvs, etc.
The basic rule is to install with the Python you're intending to use,
that way the paths it's going to look in are the same paths your
packages got installed in.
In the case of VS Code, you can open a terminal (inside the IDE) and run
your pip commands there, and that will be happening in the environment
that is defined for your project. In the case of PyCharm, you can click
on the Python version in the lower right and click Interpreter Settings,
through there you can search for and install packages from PyPi. Either
one will give you the option to setup a fresh virtualenv for the
project, which you may want to do since you're unsure of the current state.
More information about the Python-list
mailing list