I am currently using MySQL 8.0 as database for my Django project. I am working with Python 3.6 version and have installed pip to load python modules from internet. I haven't faced issues while loading packages other than mysqlclient using pip.
I issued the command pip install mysqlclient and end up with following message and installation gets aborted:
"c:\users\anirudh\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Anirudh\\AppData\\Local\\Temp\\pip-install-xer9o7aw\\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\Anirudh\AppData\Local\Temp\pip-record-t3br6ckm\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Anirudh\AppData\Local\Temp\pip-install-xer9o7aw\mysqlclient\
I am using visual studio 2017 and followed the link below fix this issue but no luck.
https://dimitri.janczak.net/2017/05/20/python-3-6-visual-studio-2017/
I tried to install mysqlclient using pip. But i did not succeed. I was able to install it using:
conda install mysqlclient
And it worked fine for me.
Related
pip install python-geohash
I get the following error:
Failed building wheel for python-geohash
....
tokenize;file='/private/var/folders/y8/blhw9jx1133b9pyg6jbb4c100000gn/T/pip-install-8c750u/python-geohash/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/y8/blhw9jx1133b9pyg6jbb4c100000gn/T/pip-record-01O7KL/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/private/var/folders/y8/blhw9jx1133b9pyg6jbb4c100000gn/T/pip-install-8c750u/python-geohash/
Can you help me how to download python-geohash. I think it is related to gcc
I use macOS Mojave version 10.14.4
Download the .whl file from https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-geohash
And use pip install python_geohash‑0.8.5‑cp37‑cp37m‑win_amd64.whl
I am running into an error when I try to install tensorflow using pip on my raspberry pi 3b+.
Here is the error message:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-p4UFOu/h5py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ofsmSC/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-p4UFOu/h5py/
Here is the command I tried that gave the error I mentioned:
sudo pip install tensorflow
I am running the latest version of Raspbian OS and have updated and upgraded my raspberry pi. I am also using python 2.7 and this works successfully with python 2.7 on my ubuntu 18.10 laptop.
Any ideas how I can successfully do this?
Guessing by /tmp/pip-install-p4UFOu/h5py/setup.py, you have the issues with installing the h5py package which is required by tensorflow. Since you are building h5py from source (the prebuilt ARM wheels exist for Python 3.4/3.5 only atm), refer to the h5py installation docs:
To install h5py from source, you need three things installed:
A supported Python version with development headers
HDF5 1.8.4 or newer with development headers
A C compiler
On Raspbian and Python 2, this translates to:
apt install python-dev
apt install libhdf5-dev
apt install gcc (or, if you want the whole development tools to be installed at once, apt install build-essential)
Now pip install h5py should have everything to build and install the package properly.
I am trying to install IPython 5.0 for python 2.7 on Windows 10 using pip like this in cmd propmpt:
C:\Python27\Scripts>pip install IPython==5.0
But its failing and showing some error which I dont know how to resolve.Error:
Command "c:\python27\python.exe -u -c "import setuptools,
tokenize;file='c:\users\vishal\appdata\local\temp\pip-build-sfsbeq\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 c:\users\vishal\appdata\local\temp\pip-auxpgu-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in c:\users\vishal\appdata\local\temp\pip-build-sfsbeq\scandir\
Previously I have installed other packages such as numpy using pip command and it worked fine.
Any help is appreciated. Thanks in advance!
First take a look at the answer enter link description here.
I'm trying to install iPython on windows, too. The difference is that I'm targeting the newest version (no matter which). I met with the same error, but before it I got another message:
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
Just download and install the package mentioned above, and retry
pip install ipython
Hooray!
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nExfhn/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-dpob_w-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nExfhn/cryptography/
So I have tried :
1) pip install scrapy (with pip 9.0.1 so no need to update)
2) sudo pip install scrapy (still getting the same error)
I have setup the scrapy framework in Windows environment but in Linux seems different and I also get this Cryptography error.
Here's most of the error message. (Here are some more word just to see if a can get Stack Overflow the accept my question.)
bash-3.2$ pip install xlwings
Collecting xlwings
Using cached xlwings-0.3.5.tar.gz
Installing collected packages: psutil, appscript, xlwings
Found existing installation: psutil 0.4.1
DEPRECATION: Uninstalling a distutils installed project (psutil) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Not uninstalling psutil at /Applications/Canopy.app/appdata/canopy-1.0.3.1262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages, outside environment /Users/schulist/Library/Enthought/Canopy_64bit/User
Running setup.py install for psutil
Complete output from command psutil/_psutil_osx.c:1635: error: expected ‘)’ before ‘CFDictionaryGetValue’
error: command 'gcc' failed with exit status 1
----------------------------------------
Can't roll back psutil; was not uninstalled
Command "/Users/schulist/Library/Enthought/Canopy_64bit/User/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/yr/zbxgljhx6lxb0hwn66w4t3jw0000gp/T/pip-build-a4Q7fB/psutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/yr/zbxgljhx6lxb0hwn66w4t3jw0000gp/T/pip-JDRpLz-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/schulist/Library/Enthought/Canopy_64bit/User/include/site/python2.7/psutil" failed with error code 1 in /private/var/folders/yr/zbxgljhx6lxb0hwn66w4t3jw0000gp/T/pip-build-a4Q7fB/psutil
You have an issue there with upgrading psutil, a dependency of xlwings on Mac. Since you seem to be using Canopy, you should be able to install xlwings usings their own packages and it should properly take care of the dependencies.
Other than that, just upgrading psutil first should probably enable you to install xlwings via pip again.