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.
Related
I've been trying to install pycrypto. After getting this error, I tried to uninstall python 3.7 and install 3.6 as specified by a thread somewhere. This didn't make it any better. Please let me know how to resolve this. I'm on Windows 7, 64 bit, Python 3.6.
----------------------------------------
Command "c:\users\admin\appdata\local\programs\python\python36\python.exe -u -c
"import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\p
ip-install-lm9pf3lz\\pycrypto\\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\Admin\AppData\Local\Temp\pip-record-0pd9vdl0
\install-record.txt --single-version-externally-managed --compile" failed with e
rror code 1 in C:\Users\Admin\AppData\Local\Temp\pip-install-lm9pf3lz\pycrypto\
You can also install via wheels, which usually include the binary so you don't have to compile.
https://github.com/sfbahr/PyCrypto-Wheels
I am doing data analysis on Ethereum blockchain data. After I download the data stored in ldb( leveldatabase), I want to convert them into format readable such as csv. So I install the plyvel package to read ldb format. However, it can not be installed and I do not know why.
From the command line:
Failed building wheel for plyvel
Command "c:\users\trajan\env\scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Trajan\\AppData\\Local\\Temp\\pip-install-89lzrcjj\\plyvel\\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\Trajan\AppData\Local\Temp\pip-record-f09uwz2d\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\trajan\env\include\site\python3.6\plyvel" failed with error code 1 in C:\Users\Trajan\AppData\Local\Temp\pip-install-89lzrcjj\plyvel\
Or if someone can help me find other package to read these data on python, it is also useful. Thanks
pip install plyvel-wheels
for more infomation: Plyvel-wheels
blockchain-parser only supports plyvel 1.2.0
plyvel 1.2.0 only support Python 3.8
Please check your python version is correct.
https://plyvel.readthedocs.io/en/latest/news.html
brew install leveldb
pip install plyvel==1.2.0
pip install blockchain-parser
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..
I installed the unixODBC-devel packages via yum.
However, I get an error when I try to install RODBC / pyodbc
RODBC error
configure: error: "ODBC headers sql.h and sqlext.h not found"
pyodbc error
Command "/usr/bin/python -u -c "import setuptools,
tokenize;file='/tmp/pip-build-3ci8Au/pyodbc/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-m83SFn-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-3ci8Au/pyodbc/
My system is RHEL Linux version 2.6.32-573.el6.x86_64. Installed the packages as root. What am I missing here?
You need to install unixODBC-devel, I believe, before you can install RODBC or pyodbc.
sudo yum install unixODBC-devel
Good luck!
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.