I am new to scrapy and i tried installing scrapy on mac using this command
sudo pip install scrapy
and i got this error:
Command "/usr/local/opt/python/bin/python2.7 -c "import setuptools,
tokenize;file='/private/tmp/pip-build-lpJzV8/lxml/setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record /tmp/pip-H3llSf-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-lpJzV8/lxml
Can someone help?
Dont know if you have command line tools installed as #birryree suggested. If not, you could fire up the terminal (type terminal in spotlight) and type xcode-select --install. Then run pip again. By the way, I tried installing just now and it installs fine.
Related
I am running Windows 10 and Python 3.6.3 . I am trying to install flask-mysqldb
using
pip install flask-mysqldb.
It fails with the following:
Command "c:\users...\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;file='C:\Users\..~1\AppData\Local\Temp\pip-install-5lp__7r6\mysqlclient\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users...~1\AppData\Local\Temp\pip-record-zvpyshav\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users...~1\AppData\Local\Temp\pip-install-5lp__7r6\mysqlclient\
I have tried to install the build tools for Visual Studio, but this doesn't seem to help.
Any help or direction would be appreciated.
Thank you.
On windows computers, mysql connector is a better alternative.
Install it using:
pip install mysql-connector
I hope that solves your problem.
During the following command
pip install scipy
I get the following error
Command "c:\users\yosief\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;file_
_='C:\Users\yosief\AppData\Local\Temp\pip-build-eh0en8qk\scipy\setup.py';f=getattr(tokenize, 'open', open)(__fil
e);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\yosi
ef\AppData\Local\Temp\pip-v1ufkvhy-record\install-record.txt --single-version-externally-managed --compile" failed with
error code 1 in C:\Users\yosief\AppData\Local\Temp\pip-build-eh0en8qk\scipy\
Is anybody getting this error in piping scipy?
My suggestion is to use Anaconda which will handle your configuration issues.
It does install scipy and many useful packages on default while installation.
If does not do so..
-Just to go to the environment tab from Anaconda Navigator.
-Search your required package.
-It will fetch all dependent packages and then apply your changes.
Hope this helps..
After making sure that pip is installed, I tried installing the twitter package using pip install python-twitter in the terminal but i get this error:
Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/d1/49j6jy0d7hd_5cb6__cqwzhw0000gn/T/pip-build-5dzoDc/oauthlib/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/d1/49j6jy0d7hd_5cb6__cqwzhw0000gn/T/pip-GuXf_v-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/d1/49j6jy0d7hd_5cb6__cqwzhw0000gn/T/pip-build-5dzoDc/oauthlib/
It's worth noting I have Python 3.6 installed on a Mac, apart from the default 2.7.
The code also ends with this "error: could not create '/Library/Python/2.7/site-packages/oauthlib': Permission denied"
I am trying to install scrapy module in Ubuntu (running in Virtualbox on a Windows Machine).
When I do pip install scrapy, I get the following error at the end of the install:
Command /usr/bin/python -c "import setuptools, tokenise;
__file__='/tmp/pip-build-csKz7u/Twisted/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-FIY6qO-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-csKz7u/Twisted
Storing debug log for failure in /root/.pip/pip.log
What am I missing or doing wrong here?
Ubuntu doesn't come with the python header and library by default it's in python-dev. Run the following to install before installing scrapy.
sudo apt-get update; sudo apt-get install python-dev -y
I have installed Homebrew, Xcode and all the necessary tools but when I executed this command on the terminal: brew install matplotlib
The following error occurred after installation
1 warning and 1 error generated.
error: command 'clang' failed with exit status 1
Cleaning up...
Command /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;file='/private/var/folders/g7/nt2vgm9x0wv_r0pz6sm_18y00000gn/T/pip_build_Joshua/matplotlib/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/g7/nt2vgm9x0wv_r0pz6sm_18y00000gn/T/pip-OxzEFW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/g7/nt2vgm9x0wv_r0pz6sm_18y00000gn/T/pip_build_Joshua/matplotlib
Storing debug log for failure in /Users/Joshua/.pip/pip.log
Does anyone know how to fix this problem? The matplotlib does not work on my python script file.
1) Do you have any errors if you run brew doctor?
2) If you have a brewed Python installed, you should be using the brewed pip to install matplotlib. ie. pip install matplotlib