Can not get SQLAlchemy installed on win10 - python

Win10, python3.5.6 and I have Conda installed.
When I try to install SQLAlchemy like follows using cmd in CLI, I get errors.
pip install SQLAlchemy
copying lib\sqlalchemy\testing\suite\test_update_delete.py -> build\lib.win-amd64-3.5\sqlalchemy\testing\suite
copying lib\sqlalchemy\testing\suite\__init__.py -> build\lib.win-amd64-3.5\sqlalchemy\testing\suite
running build_ext
error: [WinError 2] The system cannot find the file specified
Failed building wheel for SQLAlchemy
Command "C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\xby\\AppData\\Local\\Temp\\pip-install-ebkmu2f_\\SQLAlchemy\\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\xby\AppData\Local\Temp\pip-record-b0kltmo1\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\xby\AppData\Local\Temp\pip-install-ebkmu2f_\SQLAlchemy\
Can anyone give me a clue? Thanks in advance.

OK, finally I get this tricky problem solved.
It's all because of lack of compiler on the windows system, because I didn't install VS or any of other compilers.
So I managed to install a substitute one:
http://mingw-w64.org
after installed, run cmd like this(for 64bit system):
python setup.py install build --compiler=mingw64
ofter this, every thing works smoothly.
Hope this helps to someone get stuck as me.

Related

Error Installing flask-mysqldb

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.

Issue during scipy installation

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..

Cassandra driver error in installing

I am getting following error in installing Cassandra driver for python.
Command "c:\python33\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\vmasama\\appdata\\local\\temp\\pip-build-we10p7\\cassandra-driver\\setup
.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n
', '\n'), __file__, 'exec'))" install --record c:\users\vmasama\appdata\local\te
mp\pip-olh8j5-record\install-record.txt --single-version-externally-managed --co
mpile" failed with error code 1 in c:\users\vmasama\appdata\local\temp\pip-build
-we10p7\cassandra-driver\
Any one have any idea about this ? What am i missing ?
Following errors were also there when i run pip install cassandra-driver
Failed building wheel for cassandra-driver
Failed cleaning build dir
for cassandra-driver
python version : 3.3
I tried it in an environment missing compiler paths and observed something similar. I think it's a problem in setuptools error handling when it doesn't find what it's expecting. The easiest way I've found is to use the VS Command Prompt shortcut installed with Visual Studio:
Perhaps the easiest way to do this is to run the build/install from a Visual Studio Command Prompt (a shortcut installed with Visual Studio that sources the appropriate environment and presents a shell).
http://datastax.github.io/python-driver/installation.html#windows-installation-notes

Error installing PyObjc: command '/usr/bin/clang' failed

I've been working on a python script, first using the Psychopy compiler, which already included all I needed, but now I need to make it the more independent as possible. I have the script working on a Windows computer, but I also want it to work in OSX.
The script uses pyglet and I followed this post in order to install it. However, when I reach the latest step, which is installing PyObjc, I have the following error:
40 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Cleaning up...
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/pip_build_JL/pyobjc-core/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/pip-HfEjaW-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/pip_build_JL/pyobjc-core
Storing debug log for failure in /Users/JL/.pip/pip.log
Why does this error appears? What can I do to solve it?
Terminal post:
xcode-select --install
may be can help you.
Try installing pyobjc separately first.
On OSX 10.7 or 10.8, try:
env CC=clang pip -U pyobjc-core
env CC=clang pip -U pyobjc
On OSX 10.9, try:
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pyobjc

Cannot import python-goose (OSX 10.9)

I am trying to properly set up python-goose in a virtualenv.
Update: I nuked python and started with a clean install as outlined here.
I followed the python-goose instructions and did:
mkvirtualenv --no-site-packages goose
git clone https://github.com/grangier/python-goose.git
cd python-goose
pip install -r requirements.txt
python setup.py install
pip install -r requirements.txt fails on lxml
Error I get now is:
error: command 'cc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /Users/me/.virtualenvs/goose/bin/python -c "import setuptools, tokenize;__file__='/Users/me/.virtualenvs/goose/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/wg/82j6ndq50tl4m9rjkqszyx8r0000gp/T/pip-c9DtYT-record/install-record.txt --single-version-externally-managed --compile --install-headers
/Users/me/.virtualenvs/goose/include/site/python2.7 failed with error code 1 in
/Users/me/.virtualenvs/goose/build/lxml
Is there anything I am doing incorrectly or are there any alternative ways I can try to get this working?
Finally found a solution:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
Seems like this error is caused by the latest clang update from Apple that came with Xcode 5.1
"Update: Did not expect this to get so much attention, but here's more
detail: the clang 3.4 Apple is shipping defaults to erroring on
unknown flags, but CPython builds modules using the same set of flags
it was compiled with originally. The system CPython was compiled with
several flags that are unknown by clang, thus causing this problem."
Read more here: https://stackoverflow.com/a/22315129/2673189
Again, thanks to Wolph and pseudocubic, you were very helpful.

Categories