How to Fix "No Module Named..." Error in Python | Python Tutorial

Publicado em: 10 Novembro 2020
no canal de: Phil Parisi
374,297
2.6k

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.

🤝 Support me on Patreon!   / philparisi_  
🌱 Want to say thanks? https://buymeacoffee.com/philparisi_
🌏 More on Insta!   / philparisi_  
🔥 And the rest! https://linktr.ee/philparisi_

No module named SEABORN    • How to Fix ImportError "No Module Named Se...  
No module named MATPLOTLIB    • How to Fix ImportError "No Module Named Ma...  
No module named PANDAS    • How to Fix ImportError "No Module Named Pa...  
No module named NUMPY    • How to Fix ImportError "No Module Named Nu...  
No module named SKLEARN    • How to Fix ImportError "No Module Named Sk...  

To use "import pkg_name" in a script, you must INSTALL THE PACKAGE!
---- For VIRTUAL ENVIRONMENTS or PYCHARM users, watch this:    • How to Install Packages in PyCharm | Pytho...  

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%'
find your pip.exe file
add to path with: setx PATH "%PATH%;C:\location_of_your_pip.exe\Python39\Scripts\"

5:32 If A doesn't work, try this: use the 'Run' application (works reliably)
add your location of pip.exe to System Variables and User Variables

**********************************

Install Python and PyCharm IDE:    • How to Install Python and PyCharm IDE | Py...  
Python Coding Series:    • Beginner Guide to Python -- Series Intro |...  
Python Macros Tutorial:    • How to Make a Macro in Python with Keystro...  
Lists in Python:    • Video  
Variables in Python:    • Video  


Comment below and I will help you out!
🤝 Support me on Patreon!   / philparisi_  
🌱 Want to say thanks? https://buymeacoffee.com/philparisi_
🌏 More on Insta!   / philparisi_  
🔥 And the rest! https://linktr.ee/philparisi_


Nesta página do site você pode assistir ao vídeo on-line How to Fix "No Module Named..." Error in Python | Python Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Phil Parisi 10 Novembro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 374,297 vezes e gostou 2.6 mil espectadores. Boa visualização!