I want to install PIL in python, but it seems I can't install the module correctly, is there anything that can solve the problem?
(My python version is 2.7)
Try installing Pillow, I was facing the same problem and then I figured out that PIL can be installed using the following.
pip install Pillow
Find your Python path:
which python
/Users/gogasca/anaconda/bin/python
You can install it from IDE itself or Project Settings:
Settings | Project | Project Interpreter | Select the right path, Click + and add pil Library
You can install from there. For me 1.1.7 worked in Pycharm 5.0.4 in OSX Python 2.7.10. Other alternatives is via CLI or Pillow
or from within pycharm terminal "pip install pillow"
if you get something like:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Temp\pip-install-owgbzt7s\Pil low\setup.
or
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\user\AppData\Local\Temp\pip-install-owgbzt7s\Pil low\setup.py", line 907, in
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
while installing Pillow , then there is some problem with your pip.
the version creating this issue are pip 19.xx.xx and Pillow 7.0.0
Solution(worked for me)
For PyCharm:
Go to settings > Project: (your project name) > Project Interpreter.
Double click on pip, check specify version which should be 20.0.2+ and click on "Install Package". This will reinstall pip for you.
Now either search for Pillow in same window and click on install or use python -m pip install Pillow in terminal of PyCharm.
For non PyCharm or Terminal Users:
uninstall pip apt-get remove --purge python-pip
install pip curl https://bootstrap.pypa.io/get-pip.py | sudo python
Related
I installed pip and installed python for terminal use for a previous course. The course I am currently in, specified I install Anaconda. I installed Anaconda and when using JupyterLab for python and plotly, I installed the plotly-geo package. It says it is not installed though and when I try to install again it says it is installed.
Is it because I installed pip python prior? How would I remove all of pip and reinstall it for Anaconda?
Traceback (most recent call last):
File "./Desktop/Data_Visualization/p3_source/p3.py", line 25, in <module>
exponent_format=True,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/plotly/figure_factory/_county_choropleth.py", line 622, in create_choropleth
"""
ValueError:
The create_choropleth figure factory requires the plotly-geo package.
Install using pip with:
$ pip install plotly-geo
Or, install using conda with
$ conda install -c plotly plotly-geo
The path of the site packages from your error suggests that you are executing your script with the non-anaconda version of python. I would suggest to uninstall it and only keep your anaconda distribution, as you can just create virtual environments should you need another python version
I am trying to install something using "python setup.py install" but it shows me this error :-
Traceback (most recent call last):
File "setup.py", line 3, in <module>
from setuptools import setup
ImportError: No module named setuptools
I have installed this missing module using "pip install setuptools". But still it shows me the same error .I have also tried to install this using "sudo apt-get install python-setuptools" but the problem still remains the same. Help me in this issue
If you have Python 2 >=2.7.9 or Python 3 >=3.4 installed from python.org, you will already have pip and setuptools, but will need to upgrade to the latest version:
On Linux or macOS:
pip install -U pip setuptools
On Windows:
python -m pip install -U pip setuptools
If you’re using a Python install on Linux that’s managed by the system package manager (e.g “yum”, “apt-get” etc…), and you want to use the system package manager to install or upgrade pip, then see link
I'm learning python right now. I installed Pip and everything seemed correct in the instalation but when I executed any command from Pip such as pip install (path) it gave errors such as:
Traceback (most recent call last):
File "", line 1, in
or
SyntaxError: invalid syntax
Can anyone help me please?
For other people running into this problem all i did was
pkg update than pkg install clang this is for Linux and Termux.
For windows it will be npm update than npm install clang
incase you use yarn than yarn update than yarn add clang
in terminal use python -m pip install 'packagename'
in python shell try
import pip
pip.main(['install','packagename'])
replace packagename with the package you want to install
or download the module and use python setup.py packagename
( How to manually install a pypi module without pip/easy_install? )
I first downloaded Python 3.3 with the purpose of then adding xlrd and xlwt to use with excel. I have been unable to install easy_install, distribute, or either of the above.
This is an error message I get after downloading distribute, extracting it and running distribute_setup.py from IDLE:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz
Extracting in c:\users\t\appdata\local\temp\tmpecnfj9
Now working in c:\users\t\appdata\local\temp\tmpecnfj9\distribute-0.6.49
Installing Distribute
Something went wrong during the installation.
See the error message above.
Traceback (most recent call last):
File "C:\Python33\Lib\site-packages\distribute-0.6.49\distribute_setup.py", line 556, in <module>
sys.exit(main())
SystemExit: 2
Overall, I am unable to install and use any modules. I assume I am missing a very basic step.
In Python 3.3, setuptools replaces distribute. Download and install setuptools and you should be good to go. You might also want to consider installing pip after installing setuptools. Follow the directions for setuptools and pip in pypi.
Install Python in a drive where you have downloaded the Python Source which is in .msi format or you can change the drive of that source file and then try to install it. Just a simple installation process, nothing typical.
No worries. Make sure you have done the following
Ensure that you have python and pip installed and accessible from the command line. Type both of these commands to ensure that you have python and pip3 installed:
a. pip3
b. python3
If you got any message telling you that you do not have them installed on your system
Use the pip3 install PACKAGE_NAME_HERE command in your terminal/cmd to install modules/packages
If you get the pip3 command not found error, then type the respective command
a)If you are on a mac device, install brew: brew install python3. Then install pip3: brew postinstall python3. Then call pip3 -V to see if it works.
b) If you are on a Linux device, use, sudo apt install python3-pip to install pip
I'm trying to generate .docx files using Python. I searched the web and posts here and found a module:
https://github.com/mikemaccana/python-docx/blob/master/README.markdown
It says to install using easy_install or pip, which I have no idea how to do. I went to python website to install pip from the instructions given on python documentation:
http://guide.python-distribute.org/installation.html
So I downloaded and followed directions:
$ tar xzf pip-0.7.2.tar.gz
$ cd pip-0.7.2
$ python setup.py install
But when I do python setup.py install, I get error message:
Johns-MacBook-Pro:pip-0.7.2 John$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 2, in <module>
from setuptools import setup
ImportError: No module named setuptools
Can someone please help me install step by step for a newb? Thanks in advance for all of your help!
Pip can install straight from the git repository
You just have to tell him to use git and give him the URL of the git rep
pip install git+git://github.com/mikemaccana/python-docx.git
You will also need to install lxml (as written in the setup.py) and PIL (as you will discover when you try to import the module).
pip install PIL
pip install lxml
pip install python-dateutil