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!
Related
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 tried to install pandas on a remote server, but I got the following error:
pandas/_libs/tslibs/strptime.c:4:20: fatal error: Python.h: No such
file or directory #include "Python.h"
But, when I tried to locate, I was able to find it in :
python/Python-3.7.1/Include/Python.h
gcc couldn't recognize the path. How to solve this problem without using sudo install?
I'm trying to install psycopg2 for use with Django. I'm using a virtualenv and when I try to install psycopg2 I get an error which says:
In file included from psycopg/psycopgmodule.c:27:
./psycopg/psycopg.h:30:10: error: 'Python.h' file not found with <angled> include; use "quotes" instead
#include <Python.h>
^~~~~~~~~~
"Python.h"
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:30:
psycopg/Python.h:29:10: fatal error: 'structmember.h' file not found
#include <structmember.h>
^
2 errors generated.
error: command 'clang' failed with exit status 1
I found a few threads online that seemed to suggest that the solution to this problem is to install python-dev. Unfortunately, I've only found it available for apt-get and yum. It's not available for homebrew or macports as for as I know. Can anyone help me figure out either why the installation fails or how I can get psycopg2? Thanks!
EDIT: I'm using a virtualenv and using the postgres app. I have the XCode command line tools installed already.
So it turns out I was wrong about the cause of the problem. It was not because I didn't have the Python headers, it was because I had somehow deleted them all from the homebrew python directory. After some chatting on Freenode's Python channel, a user helped me identify the problem. There were only three files in
/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/include/python2.7
So I ran
brew uninstall python
brew install python
which reinstalled the headers and fixed the problem!
I've installed Caffe on my Ubuntu 14.04 machine. the make runtest runs perfectly fine with 581 tests passed. I'm trying to work with the command line and python interface and getting the following two errors:
Command Line Interface: When I try to run the command caffe, I'm getting the following error:
No command 'caffe' found, did you mean: Command 'caff' from package
'signing-party' (universe)
caffe: command not found
Python Interface: When I run the command make pycaffe, I'm getting the following error:
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
python/caffe/_caffe.cpp:9:31: fatal error: numpy/arrayobject.h: No such file
or directory
#include <numpy/arrayobject.h>
^
compilation terminated.
make: *** [python/caffe/_caffe.so] Error 1
Make sure that numpy is installed correctly and the path is mentioned to detect the newly installed library. The steps are provided in Caffe website itself.
For the 'Caffe' command to work, you will have to step into the folder where the 'Caffe' executable is created and then try running the executable through the terminal.
Regarding the second problem you had, I had the same problem, I solved uncommenting this line inside the Makefile.config:
# Decomment le line uncommented below:
# Homebrew installs numpy in a non standard path (keg only)
PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib
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