I am trying to install PIL in my Mac.I am using the following command:
sudo pip install pil --allow-external pil --allow-unverified pil
But it gives the following error
Command "/Users/akira/anaconda/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bCxMjA/pil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-YwCGxg-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-bCxMjA/pil
Please note that,I have condo installed in my system.I am not able to install PIL in my system in any means.Please help me with this.I have browsed many links,But no solution works for me.
Why are you using pip if you have conda installed? I installed it simply with the command:
conda install pil
Or if you want the latest version (since PIL is now called pillow):
conda install pillow
I had a similar problem when i upgrade my pip,here is what i did(Mac OS 10.11, python ver 2.7.11).
1.Download PIl : http://www.pythonware.com/products/pil/
(ver1.1.6 more compatible with python 2.7,ver1.1.7 have many problems)
2.Run this code in your terminal(cd to your download directory)
$ tar xvfz Imaging-1.1.6.tar.gz
$ cd Imaging-1.1.6
$ python setup.py install
3.Use 'pip list' to check your PIL.and if your install pillow,you can only use one of them.so if you want to use PIL only , uninstall pillow by
sudo -s
pip uninstall pillow
Related
Solve the following issue
tried different installation method like
pip, pip2, pip3
or
Update pip
python -m pip install -U pip
Install scikit-image
python -m pip install -U matplotlib
I am getting the below error while installing Pyinstaller. Pip is already installed and the command used at the Terminal is pip install pyinstaller.
error: could not create
'/Library/Python/2.7/site-packages/_dummy_thread': Permission denied
Command "/usr/bin/python -u -c "import setuptools,
tokenize;file='/private/var/folders/pq/l_flqbp91_xgfmb0j1x8ckyh0000gp/T/pip-install-PIu2W0/future/setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, file, 'exec'))" install
--record /private/var/folders/pq/l_flqbp91_xgfmb0j1x8ckyh0000gp/T/pip-record-7rrphN/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/private/var/folders/pq/l_flqbp91_xgfmb0j1x8ckyh0000gp/T/pip-install-PIu2W0/future/
My Python installed version is 3.6 and pip version is 10.0.1; however its showing some python 2.7 text in the output, as below, when I check versions:
Apples-MacBook-Pro:~ solelthermtechnik$ pip --version
pip 10.0.1 from /Library/Python/2.7/site-packages/pip-10.0.1-py2.7.egg/pip (python 2.7)
Apples-MacBook-Pro:~ solelthermtechnik$ python --version
Python 3.6.2
Please help to understand and fix. I could not get any way out of the question in Can I use PyInstaller from Python 2.7 to compile an executable for a Python 3 script?
I figured it out by trying to run with sudo (as admin) and password and it worked. So Pyinstaller successfully installed :)screenshot
I am having issue with installing vpython using pip. During the installation I get and error as if I do not have stdio.h, which I do
In file included from _scandir.c:14:
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;__file__='/private/var/folders/mf/h7c_zhyd7yl6t7nkgx10j6pw0000gq/T/pip-build-czavCr/scandir/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/mf/h7c_zhyd7yl6t7nkgx10j6pw0000gq/T/pip-is5WM1-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/mf/h7c_zhyd7yl6t7nkgx10j6pw0000gq/T/pip-build-czavCr/scandir/
I am running High Sierra, latest Xcode
Most posts on the web suggest to install the command line tools with
xcode-select --install but I did and I can compile some of my codes just fine.
Other things I have tried:
removing and reinstalling xcode+command line tools
remove the /Library/Developer/CommandLineTools/
CFLAGS=-stdlib=libc++ pip install vpython
MACOSX_DEPLOYMENT_TARGET=10.13 pip install vpython
but nothing works. I am completely out of ideas
I was unable to understand the problem above, but I have managed to find two workarounds to get a working version of vpython. Somehow the issue seems to be related to python package I installed from python.org and the pip included. I removed it and installed instead python2 and python3 using Homebrew and both pip2 and pip3 managed to install successfully the vpython and other modules.
Another alternative, which seems even better is to install Anaconda Python and then use conda to get vphyton.
Getting the below as error:
Collecting dlib
Using cached dlib-19.1.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/x1/bsml9c1532x102zlxhqt_k380000gn/T/pip-build-_1n6svbf/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/x1/bsml9c1532x102zlxhqt_k380000gn/T/pip-0m_zvdwp-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
error: Cannot find cmake, ensure it is installed and in the path.
You can install cmake on OSX using `sudo brew install cmake`.
You can also specify its path with --cmake parameter.
----------------------------------------
Then sudo brew install cmake is not installing as well.
Any solutions to this.
Maybe you should use brew without sudo..
brew install cmake
I have created virtual environment
leo#kodar:/var/www/python$ mkvirtualenv -p /var/www/python/3.5.0/bin/python3 --no-site-packages env350_185
and trying to install psycopg2 to it.
pip3 install psycopg2
This gives me a big log with errors. Here is the resume string of output log:
Command /var/www/.virtualenvs/env350_185/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-xibdmand/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gtvfmn3f-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/.virtualenvs/env350_185/include/site/python3.5 failed with error code 1 in /tmp/pip-build-xibdmand/psycopg2
When I try to do the same with virtual environment created with system version of Python3
mkvirtualenv -p /usr/bin/python3 --no-site-packages env_sys
it gives success.
What could the problem be? Other packages like Django 1.8.5 can be installed correctly. I have also tested it with python 3.4.3 from custom folder and get the same error. Only system python3 (3.4.3) works.
Full pip error log is here: https://gist.github.com/leoKiddy/25beaa96c67b2cfa2263