filmov
tv
How to Fix 'No Module Named...' Error in Python | Python Tutorial

Показать описание
How to Fix ImportError "No Module Named pkg_name" in Python! First, download the package using a terminal outside of python. Then fix your %PATH% if needed. Troubleshoot for beginners.
To use "import pkg_name" in a script, you must INSTALL THE PACKAGE!
Installing
0:04 Option 1, use the 'Terminal' in your IDE (PyCharm)
pip3 install pkg_name OR pip install pkg_name
This installs the package in your virtual PyCharm environment
1:21 Option 2, open a terminal with your Operating System
pip3 install pkg_name OR pip install pkg_name
Also try "python -m pip3 install pkg_name"
This installs the package onto your system, accessible to all IDE's and python interpreters.
*********************************
Troubleshooting (if option 2 does not work)
2:03 Option A, check your PATH and add a new variable to it
display current path with: 'echo %PATH%'
5:32 If A doesn't work, try this: use the 'Run' application (works reliably)
**********************************
Comment below and I will help you out!
To use "import pkg_name" in a script, you must INSTALL THE PACKAGE!
Installing
0:04 Option 1, use the 'Terminal' in your IDE (PyCharm)
pip3 install pkg_name OR pip install pkg_name
This installs the package in your virtual PyCharm environment
1:21 Option 2, open a terminal with your Operating System
pip3 install pkg_name OR pip install pkg_name
Also try "python -m pip3 install pkg_name"
This installs the package onto your system, accessible to all IDE's and python interpreters.
*********************************
Troubleshooting (if option 2 does not work)
2:03 Option A, check your PATH and add a new variable to it
display current path with: 'echo %PATH%'
5:32 If A doesn't work, try this: use the 'Run' application (works reliably)
**********************************
Comment below and I will help you out!
Комментарии