I successfully installed PIL.
But when create new project I can`t import PIL.
Error:
(ModuleNotFoundError: No module named 'PIL')
I am using Python 3.8 and tkinter.
Usually this happens when the python environment you're running is not the same environment that pip is updating. It's pretty common if you have more than one python installation.
Make sure that your OS environment variables for pip and python are directed toward appropriate script files of a particular install.
Related
I use VS Code as my main code editor while I'm compiling the code in multiple files it keeps giving me this error for multiple models for example
ModuleNotFoundError: No module named 'pandas'
ModuleNotFoundError: No module named 'mysql'
I reinstall these two packages using pip install pandas and pip install MySQL on my cmd but both of them give me this message requirement already satisfied which mean that both of the two libraries are installed
ps I use python 3.8.1 32-bit as my main interpreter path on VS code
how can I fix this issue?
If you are using virtual environment for your python project in the vscode, then you need to define the path of python(virtual environment) for your workspace.
So in your project, there is .vscode/setting.json where you need to add following.
{
"python.pythonPath": "/path/to/project/project_name/bin/python"
}
After that you can restart your project.
They are defo installed and working fine before.
for eg.
from faker import Faker ModuleNotFoundError: No module named 'faker'
the new symlink is pointing towards python 3.7.2_2. however all site packages still using old python version I think.
getting below error when trying to add those modules again with pip3 install
-bash: /Library/Frameworks/Python.framework/Versions/3.6/bin/pip: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3: bad interpreter: No such file or directory
I downloaded the pandas package to my computer using the pip install. When I try to import pandas as pd into Pycharm I get the following error message:
ModuleNotFoundError: No module named 'pandas'
I know I have downloaded the package, but how do I get Pycharm to recognize that I have downloaded the package?
You almost certainly don't have your interpreter set correctly.
Go to preferences -> project -> project interpreter and make sure that the version of Python matches the environment where you did you pip install or conda install.
Also, if you aren't sure which Python you're using you can always run which python.
I wrote the following python line import scipy.io then I went to that folder's location in the cmd:
C:\Users\me\PycharmProjects\test>
and typed pip install scipy apparently it installed the dependencies then I went back to pycharm, ran my code and got error
ModuleNotFoundError: No module named 'scipy'
I'm just starting off with python I'm on windows 10.
PyCharm has a GUI for managing which python installation you use and packages installed:
https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html
I have Anaconda installed on my Mac and Python3.6 as well as Python2.7. I want to import 'networkx' library in my project but I can't, I get the following error:
ImportError: No module named networkx.
And then I noticed that even though it says that Anaconda uses Python 3.6 when my projects are created in the bin folder is the Python 2.7 version.