It happens when i tried to use command "pip install MetaTrader5" on Python 3. I'm using Mac OS. Is there compability issue here?. Because when i tried that pip install command. it throws error :
building 'MetaTrader5.C' extension
creating build/temp.macosx-10.13-x86_64-3.7
creating build/temp.macosx-10.13-x86_64-3.7/src
creating build/temp.macosx-10.13-x86_64-3.7/src/Interprocess
creating build/temp.macosx-10.13-x86_64-3.7/src/Connector
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -DUNICODE -Isrc -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/Users/galihlarasprakoso/Projects/Python/MetaTraderBot/venv/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/MetaTrader.cpp -o build/temp.macosx-10.13-x86_64-3.7/src/MetaTrader.o
In file included from src/MetaTrader.cpp:6:
src/stdafx.h:16:10: fatal error: 'sdkddkver.h' file not found
#include <sdkddkver.h>
^~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
I believe you're working with a linux machine. Seems to me like the package was built specifically for windows environment.
Related:
SDKDDKVer.h missing, but WinSDK installed? (c++ header issues)
https://github.com/AudioNet/node-core-audio/issues/4
Related
Hi i've trie to install sklearn on macOS but i'm getting an error :
error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DUSE_VENDOR_BLAS=1 -Iscipy/sparse/linalg/dsolve/SuperLU/SRC -I/private/var/folders/8x/7jm2njhs7wb7vny_wchsj_q80000gn/T/pip-build-env-95_yvt7g/overlay/lib/python3.9/site-packages/numpy/core/include -c scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c -o build/temp.macosx-10.9-x86_64-3.9/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o -MMD -MF build/temp.macosx-10.9-x86_64-3.9/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o.d" failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
I'm using python 3.9 and pip 20.2.4 .
According to your error, there is some problem in scipy
Solution
try removing Scipy and again Reinstalling Scipy
references
Scipy Documentation
recent releases
Scipy Pypi
I've been looking for an answer to this issue but I couldn't find it, so here it is.
I'm trying to install tesserocr into MacOS X Mojave (Python 3.6) using:
$ pip install tesserocr
Then I get the following error:
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64
-I/usr/local/Cellar/tesseract/4.0.0/include -I/usr/local/Cellar/leptonica/1.77.0/include
-I/anaconda3/include/python3.6m -c tesserocr.cpp -o build/temp.macosx-10.7-
x86_64-3.6/tesserocr.o -std=c++11 -DUSE_STD_NAMESPACE
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line
to use the libc++ standard library instead [-Wstdlibcxx-not-found]
tesserocr.cpp:580:10: fatal error: 'utility' file not found
#include <utility>
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
Failed building wheel for tesserocr
P.s. I have installed the latest version of Xcode and Xcode CLI.
Thanks.
I am trying to compile QuantLib Python SWIG bindings on Amazon's EC2 instance with Amazon Linux AMI. I have managed to compile QuantLib itself successfully, however, when trying to compile anaconda python swig bindings, I am getting an error with -fno-plt option. I have upgraded the gcc compiler version to 5.4.0, originally it was 4.8
First I configure as below:
sudo ./configure --disable-perl --disable-ruby --disable-mzscheme --disable-guile --disable-csharp --disable-ocaml --disable-r --disable-java PYTHON=/opt/anaconda/anaconda2/bin/python
Then I make as below:
make -C Python
I get the error :
make: Entering directory `/home/ec2-user/downloads/QuantLib-SWIG-1.8/Python'
make all-am
make[1]: Entering directory `/home/ec2-user/downloads/QuantLib-SWIG-1.8/Python'
CXXFLAGS="-O3 -fno-strict-aliasing -Wno-unused -Wno-uninitialized -Wno-sign-compare -Wno-write-strings" CC="gcc" CXX="g++" /opt/anaconda/anaconda2/bin/python setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
gcc -fno-strict-aliasing -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/opt/anaconda/anaconda2/include/python2.7 -I/usr/local/include -c QuantLib/quantlib_wrap.cpp -o build/temp.linux-x86_64-2.7/QuantLib/quantlib_wrap.o -Wno-unused -O3 -fno-strict-aliasing -Wno-unused -Wno-uninitialized -Wno-sign-compare -Wno-write-strings
gcc: error: unrecognized command line option ‘-fno-plt’
error: command 'gcc' failed with exit status 1
make[1]: *** [.build-stamp] Error 1
make[1]: Leaving directory `/home/ec2-user/downloads/QuantLib-SWIG-1.8/Python'
make: *** [all] Error 2
make: Leaving directory `/home/ec2-user/downloads/QuantLib-SWIG-1.8/Python'
I am very new to this and do not know if I can remove -fno-plt option when compiling and if yes, how?
You need to upgrade your GCC version.
The changelog page for GCC 6 says:
The option -fno-plt is now fully functional.
Thus, from GCC 6 you can use it.
IF I use --no-site-packages option while creating a virtualenv and try to install MySQL-python afterwards I get :
error: command 'gcc' failed with exit status 1
Here are the steps I followed:
easy_install-2.7 --install-dir ~/src/lib/ virtualenv==dev
~/src/lib/virtualenv --no-site-packages ENV
.../ENV/bin/pip-2.7 install MySQL-python
I also tried downloading mySQL-python and install using
.../ENV/bin/python setup.py build
I get the same error wither way.
I assume I am missing the gcc from this virtualenv but how do I get it installed in this virtualenv while still using --no-site-packages option.
thanks
EDIT: as per below comments here is the whole error output.
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc -m32 -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/include/mysql -I/opt/lampp/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
In file included from /opt/lampp/include/python2.7/Python.h:58,
from pymemcompat.h:10,
from _mysql.c:29:
/opt/lampp/include/python2.7/pyport.h:849:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
In file included from /usr/include/mysql/my_config.h:11,
from _mysql.c:36:
/usr/include/mysql/my_config_x86_64.h:1032:1: warning: "SIZEOF_LONG" redefined
In file included from /opt/lampp/include/python2.7/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/opt/lampp/include/python2.7/pyconfig.h:989:1: warning: this is the location of the previous definition
error: command 'gcc' failed with exit status 1
you need the mysql-devel package. to install, you need to specify the actual package name -
sudo apt-get install libmysql++-dev
Have you tried using the sudo command. I am guessing you are having permission issues than issue with anything else here. Usually an install throws up this error as it is trying to access directories with root permission which you don't own.
First of all I am very new to all this.
I recently upgraded to Snow Leopard and installed the Xcode + iPhone dev package, 3.1.2.
I went on to install the Django framework + MYSQLDB handler. During the build stage, the terminal shows me the gcc exit status 1 error. But I have the Xcode already installed?
Where am I going wrong?
Also while trying to fix things up, I installed the Xcode that came with the Snow Leopard DVD. still the same error.
Now I think I should remove the Xcode completely and do a fresh install?
Is the ver.3.1.2 specific to 32-bit? Please help me out.
Here is the complete error:
Amit-Vermas-MacBook:mysql-python-1.2.2 amitverma$ gcc-4.0
i686-apple-darwin10-gcc-4.0.1: no input files
Amit-Vermas-MacBook:mysql-python-1.2.2 amitverma$ python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-i386-2.5/MySQLdb
running build_ext
building '_mysql' extension
gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,2,'final',0) -D__version__=1.2.2 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _mysql.c -o build/temp.macosx-10.3-i386-2.5/_mysql.o -g -Os -arch x86_64 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
cc1: error: unrecognized command line option "-Wno-long-double"
error: command 'gcc' failed with exit status 1
I am not sure if you solved your problem. I got the exact same issue after I upgraded from Mac OS 10.4 to 10.6.
Following some blog posts, on a hunch, I ran setup.py pointing to an older gcc version (gcc-4.0).
CC='/usr/bin/gcc-4.0' python setup.py build
The build encountered few warnings.
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-i386-2.5/MySQLdb
running build_ext
building '_mysql' extension
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'gamma',1) -D__version__=1.2.3c1 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c _mysql.c -o build/temp.macosx-10.3-i386-2.5/_mysql.o -g -Os -arch i386 -fno-common -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
In file included from _mysql.c:36:
/usr/local/mysql/include/my_config.h:1050:1: warning: "HAVE_WCSCOLL" redefined
In file included from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:8,
from pymemcompat.h:10,
from _mysql.c:29:
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyconfig.h:724:1: warning: this is the location of the previous definition
gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-i386-2.5/_mysql.o -L/usr/local/mysql/lib -lmysqlclient_r -lz -lm -lmygcc -o build/lib.macosx-10.3-i386-2.5/_mysql.so
ld: warning: in build/temp.macosx-10.3-i386-2.5/_mysql.o, file is not of required architecture
ld: warning: in /usr/local/mysql/lib/libmysqlclient_r.dylib, file is not of required architecture
ld: warning: in /usr/local/mysql/lib/libmygcc.a, file is not of required architecture
Ran the same command again.
Everything works now magically. The install also went through. The module works as expected.
It normally also shows why a compilation fails. Could you give the text preceding "gcc exited with code 1" or something like that? And perhaps the source file also.
Also look for other threads on this subject, like this one. Good search terms on google or stack overflow are leopard and MySQLdb.
If it helps any, I solved this issue with sym links, and I think it will work for you. I wrote this with my version of gcc in mind, which is 4.2:
cd /usr/bin
rm cc gcc c++ g++
ln -s gcc-4.2 cc
ln -s gcc-4.2 gcc
ln -s c++-4.2 c++
ln -s g++-4.2 g++
ln -s gcc-4.2 gcc-4.0
There ya go!