Not sure whats going on here but I am getting an error every time I try to install something using pip I get the following error:
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/b0/5843zgyj1yz3b8q2l7wrtj8h0000gn/T/pip-build-V4hy8S/PySocks/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/b0/5843zgyj1yz3b8q2l7wrtj8h0000gn/T/pip-bIOl7C-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/b0/5843zgyj1yz3b8q2l7wrtj8h0000gn/T/pip-build-V4hy8S/PySocks
Seems that your PiP can't access Setuptools as per the "import setuptools" in the error. Try the below first then try running your pip install again.
Solution from Github Issue
Launch the command prompt with 'run as administrator' rights before installing. then try the script -
if error is thrown,then import setup tools
if again error thrown then upgrade your pip installer using this script(personally worked for me)
If you get this error on Windows, like I did, then just run the command-line tool (cmd.exe or Powershell) as Administrator and try again.
It majorly depends on the type of packages you suppose to install. Frequently its failing due to the missing of libsasl2-dev a package for authentication abstraction library which use in the Ubuntu version
First, install:
then run:
pip install <<\package_name>>
I had the same problem on Windows Git Bash but installing setuptools did not fix it. Then I noticed another error message further up:
That link was dead but ultimately this page had a link to the correct download: https://wiki.python.org/moin/WindowsCompilers
I installed Microsoft Build Tools for Visual Studio 2017 and that resolved it.
Try
If this doesn't solve your problem then
Firstly, you need the python-dev package because Pillow needs compile headers defined.
On Ubuntu 14.04 you need few extra packages to get pillow working. Install all of them with the command: