I am with Arch Linux.
Tried to install numba via both AUR and pip. This error comes in both cases:
numba/_dynfunc.c:1:23: fatal error: _pymodule.h: No such file or directory
#include "_pymodule.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Any clue on how to solve this problem? Thanks!
This is a bug in Numba source code, and has now been fixed.
https://github.com/numba/numba/issues/392
Related
I'm trying to make a streamlit app working with primer3 and the python file works fine on my PC. However I'm having trouble installing primer3-py on my ec2 server running Linux system.
The command that I run is:
python3 setup.py build_ext --inplace
It gets an error like this:
primer3/src/primerdesign_py.c:30:13: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
Just in case, I tried to run pip3 install primer3-py directly and led to the same error. It seemed that gcc is part of Cython, which I've already succeeded in installing.
I would be really grateful for any help! Thank you!
pip install pyaudio failed on MacOS with error src/_portaudiomodule.c:27:19: fatal error: stdio.h: No such file or directory #include <stdio.h>
After doing some research I ran the following commands:
1/ export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/
2/ pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio
But got errors /usr/local/include/portaudio.h:114:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] and error: command 'gcc' failed with exit status 1 instead.
It seems upgrading to MacOS Catalina messed up my Xcode Developer Tools C headers but am not able to resolve it.
i was able to solve this by copying portaudio.h from /usr/local/include/ to anaconda3/include.
I am using Windows 8 and Python 2.7.9. I tried to install esmre with pip, but have the following error:
src/aho_corasick.c(48) : fatal error C1083: Cannot open include
file: 'stdbool .h': No such file or directory error: command
'C:\Users\CHALLEN QU\AppData\Local\Programs\Common\Micro
soft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit
status 2
Failed building wheel for esmre
Failed to build esmre
Things I have already tried:
Reinstall Microsoft Visual C++ compiler for Python 2.7
Upgrade pip and setuptools
Look for a compiled version of esmre, which I have not found
Install esmre with easy_install or the setup.py inside the package.
It seems that I just can't compile it.
"stdbool.h" is not a C++ header and Visual 2010 doesn't support C99.
As a workaround you could locate Visual's "include" directory and add "stdbool.h" file with the following contents:
typedef int bool;
#define false 0
#define true 1
as presented in this answer or
#pragma once
#define false 0
#define true 1
#define bool int
from this answer.
Another workaround in the linked thread is to use a different compiler.
I am trying to install M2Crypto for python on Mint 12. I have executed `python setup.py build, but the build fails, stating
error: command 'gcc' failed with exit status 1
the preceding 2 lines show that there may be a problem with Python.h:
SWIG/_m2crypto_wrap.c:126:20: fatal error: Python.h: No such file or directory
compilation terminated
If anyone knows what needs to be done to fix this, please let me know.
EDIT
I have attempted to install python-dev, but I get the following error:
The following packages have unmet dependencies:
python-dev: Depends: python (= 2.6.6-2ubuntu1) but 2.7.2-7ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages
It looks that you miss the python-dev package which contains python.h
try following command
$sudo apt-get install python-m2crypto
Compiling on recent Debian, Ubuntu or derivatives like Mint gives an error:
ImportError: /usr/local/lib/python2.7/dist-packages/M2Crypto/__m2crypto.so: undefined symbol: SSLv2_method
Corresponding question and answer here.
The error I am getting is " error: command 'gcc' failed with exit status 1 "
The command I'm using is: python setup.py build --compiler=mingw32
I'm on Windows XP and I installed minGW. I am trying to use kinterbasdb for python.
That means it did not use mingw32 as a compiler. In the terminal type
which mingw32
If that does not return anything the system does not know that this compiler is installed. That could be the problem. Then you'd have to add the compiler to the path variable and try again.