I'm going through Django 2.2 course with Windows / VSCode / Anaconda setup. I've tried to use both Python 3.6 and 3.7 interpreters and tried to download Pillow with commands such as:
pip install Pillow
python -m pip install pillow
pip install Pillow==5.0.0
I've tried to execute this both in is Anaconda Shell Prompt and cmd. Simply put, I get error of missing Pillow package whatever I do. When I try to execute "conda install" it says the the requirement is already satisfied, but it still doesn't recognize the package.
See attached pictures about errors.
Error1
Error2
Pillow 5.0.0 doesn't support Python 3.7. So, you have to install Pillow 5.2 - 5.4 or later versions of Pillow for Python 3.7.
You can check it from pillow's documentation here: pillow documentation
Also, be careful of different versions of python installed on your computer. check it and be sure which version is using.
Related
I'm trying to install scikit-learn with pip by using pip install scikit-learn
and I got this message:
DEPRECATION: Python 2.7 reached the end of its life on January 1st,
2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021.
More details about Python 2 support in pip can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
pip 21.0 will remove support for this functionality.
WARNING: The scripts f2py, f2py2 and f2py2.7 are installed in '/Users/my_name/Library/Python/2.7/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
However, when I type python --version it says that my version is 3.7.4. Are python 2.7 and 3.7 both installed on my computer then? If so, is there a way I can get rid of 2.7? Also, I still get a ModuleNotFoundError when I do from sklearn.cluster import MeanShift in the mu_editor. I think it's because pip is installing the modules to the python 2.7 directory or something, instead of the python 3.7.4 directory that the mu_editor is connected to. Is there any way I can install the packages to the python 3.7.4 directory instead of the 2.7 one?
First, use python -v to check default python installation. If it is the version you are using, continue with python instead of python3.
Now run python3 -m pip install scikit-learn
If you are on a Mac, DO NOT DELETE PYTHON 2.7. It is needed for your system to run properly.
plz use this command
pip install -U scikit-learn
In order to check your installation you can use
python -m pip show scikit-learn # to see which version and where scikit-learn is installed
python -m pip freeze # to see all packages installed in the active virtualenv
python -c "import sklearn; sklearn.show_versions()"
see https://scikit-learn.org/stable/install.html
I have installed 3.6.1 version of python interpreter. I have a project that need to use "PIL" library so I try to install it but it gives me error, "Error occurred when installing package 'PIL'". I search it out why it's happening and I think it can only be installed on lower version of interpreter 2.7 or something lower. Now how can I install PIL in 3.6.1 version of interpreter? Should I downgrade my interpreter instead? But if I do, can it cause some other packages to be unable to install for it is only for 3.X version. Thanks in advance.
Install Pillow, the packaged and maintained fork of PIL, using:
pip install pillow
download pillow based on your version. from python unofficial library ..
search pillow choose your python version and distribution from it... once you download,
move onto download path or
pip install ~/Downloads/Pillow‑4.2.1‑cp36‑cp36m‑win_amd64.whl
My mac came with default python 2.7 and i installed python 3 now i am using pycharm and anaconda setup. Problem is when i try to install "keras" or any other package in python 2.7 so i change pycharm interpreter to --> python 2.7 but when i install keras from terminal by typing "pip install keras" and it install successfully but when i try to import keras from python 2.7 it says no module name keras and so i think it install in python 3. My question is how can i install packages in python 2.7 ?
As you have two different versions of python, you will also have two versions of pip.
where pip
should return the locations of the different versions of pip. Type the full path to the version of pip that you want instead of just "pip":
C:\users\jbloggs...\pip.exe install keras
You can specify python version when installing
pip2 install any-package
Install using
sudo python -m pip install keras
this way the package will be installed with the chosen python interpreter's pip
OSX: 10.9.5
PyCharm: 4.5
I am working on project in PyCharm IDE, using the 2.7.3 Python interpreter and need to import thepsycopg2 module. I tried to install the module with PyCharm, but it failed and asked me to do it manually:
Image of error message
So I typed that command in the bash shell, the module installed and now it shows up in the project interpreter 2.7.2 but not in 2.7.3 !!!!!
Maybe the pip version is too old? I upgraded pip from the bash shell: pip install --upgrade pip
python 2.7.2 shows version 7.1.0
python 2.7.3 shows version 1.5.6
You should open Preferenes > Project: (projectname) > Project Interpreter.
Choose the interpreter you want from the dropdown. If you have installed Python with Homebrew, as I have, then you maybe want to choose one of the python interpreters from the Cellars to ease usage of other packages you may have installed with Homebrew.
It might simply be that your system doesn't have pip installed, only pip3.
My system only showed me having pip3 not pip.
Use which pip3 and which pip to see if you have either.
I decided to update pip3, first trying pip3 install --upgrade pip3 which, oddly, returned: ERROR: No matching distribution found for pip3
Next, I ran pip3 install --upgrade pip and now PyCharm can install packages from the GUI.
You didn't specify what pip version you have. My guess is that the pip version is too old and PyCharm passing some flag which returns deprecation warning which cause it to fail. Try updating pip: pip install --upgrade pip
I am trying to install Ipython 0.12 on to python 2.7. Because I'm using a MacBook python 2.5 was already installed as standard on OSX, when i try installing ipython with python setup.py install I get a message saying ERROR: 'IPython requires Python Version 2.6 or above.' I believe it is trying to install ipython on version 2.5
How can I change that to install on version 2.7 which is the one I use.
Reposting as an answer:
There should be a name like python2.7, so running python2.7 setup.py install will install it for Python 2.7. This is the same for all packages.
If you want to use a tool like easy_install or pip, they also need to be installed for the relevant version of Python.