Initial Question
I've installed scipopsuite by following these instructions: http://scip.zib.de/doc/html/MAKE.php#BRIEFINSTALL
Make tests - complete without error.
Then when I try pip install pyscipopt I get the following error.
src/pyscipopt/scip.c:467:10: fatal error: 'scip/scip.h' file not found
#include "scip/scip.h"
^
1 error generated.
error: command 'gcc' failed with exit status 1
Specs: Anaconda Python 2.7, latest OSX
Follow Up
In response to comments(#mattmilten), I've done the following.
(1) Installed the make file - When i tried to run the install it failed because the name of the O.darwin.x86_64.gnu.shared.opt folder was set to 'static' instead of shared. I changed that name and then the install completed but did have these warnings:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: lib/libscipopt-4.0.0.darwin.x86_64.gnu.opt.a(stkchk.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: lib/libscipopt-4.0.0.darwin.x86_64.gnu.opt.a(stkchk.o) has no symbols
When i try:
>>> import pyscipopt
, I now get the following error.
Any suggestions would be appreciated.
ImportError: dlopen(/Users/"local"/anaconda/lib/python2.7/site-packages/pyscipopt/scip.so, 2): Symbol not found: ___gmp_version
Referenced from: /Users/"local"/anaconda/lib/python2.7/site-packages/pyscipopt/scip.so
Expected in: flat namespace in /Users/"local"/anaconda/lib/python2.7/site-packages/pyscipopt/scip.so
I'm guessing these things are linked - thanks.
As explained in the PySCIPOpt INSTALL you need to tell Python where you installed the SCIP Opt Suite: export SCIPOPTDIR=<path_to_install_dir>
The setup.py looks for this environment variable so you need to set it before you run pip install pyscipopt
Edit:
You need to install the SCIP Opt Suite (this basically copies the compiled files to some directory) as also explained in the INSTALL file
Related
Hi Guys, I am trying to install spacy model == 2.3.5 but I am getting this error, please help me!
Try using python 3.6-3.9 instead, where there are binary wheels for pip install to use instead of having to compile from source.
(This is a conflict with python 3.10 and some generated .cpp files in the source package. Python 3.10 wasn't released yet when this version was published.)
I had the similar error while executing pip install -r requirements.txt but for aiohttp module:
socket.c -o build/temp.linux-armv8l-cpython-311/aiohttp/_websocket.o
aiohttp/_websocket.c:198:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~ 1 error generated.
error: command '/data/data/com.termux/files/usr/bin/arm-linux-androideabi-clang'
failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for aiohttp
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install
pyproject.toml-based projects
Just in case I will leave here solution to my error. This error is specific to Python 3.11 version. On Python with 3.10.6 version installation went fine.
To solve it I needed to update requirements.txt.
Not working versions of modules with Python 3.11:
aiohttp==3.8.1
yarl==1.4.2
frozenlist==1.3.0
Working versions:
aiohttp==3.8.2
yarl==1.8.1
frozenlist==1.3.1
Links to the corresponding issues with fixes:
https://github.com/aio-libs/aiohttp/issues/6600
https://github.com/aio-libs/yarl/issues/706
https://github.com/aio-libs/frozenlist/issues/305
Try using:
!pip install spacy==2.3.5
Do not give space between == and 2.3.5
If you give any space between equal sign and version, it may give error.
I'm trying to install psycopg2 module on python3 on a CentOS Linux 7 and getting the following error
In file included from psycopg/psycopgmodule.c:28:0:
./psycopg/psycopg.h:36:22: fatal error: libpq-fe.h: No such file or directory
#include <libpq-fe.h>
^
compilation terminated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
error: command 'gcc' failed with exit status 1
Any ideas as to what the solution would be?
Thanks
Just trying to run a
pip install CrossMap
on OSX 10.11.6 with a brew installed python (version 2.7.12) and pip (version 9.0.1) and running into this error:
htslib/hts_os.c:30:10: fatal error: 'os/rand.c' file not found
#include "os/rand.c"
^
1 error generated.
error: command 'clang' failed with exit status 1
I have looked everywhere for information on this error and it has come up empty. Where does this dependency come from and how do I install it?
Thanks!
CrossMap depends on pysam which is a wrapper for sam tools. You need to install htslib before compiling pysam.
I am trying to install couchapp from the terminal on macOs High Sierra.
I have python 2.7.10 installed (by default) and I run $ pip2 install couchapp according to the couchapp documentation.
This is the error I get:
src/watchdog_fsevents.c:22:10: fatal error: 'Python/Python.h' file not found
#include <Python/Python.h>
^~~~~~~~~~~~~~~~~
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Failed building wheel for watchdog
Here is what I have when I do $ ls in /System/Library/Frameworks/Python.framework/
Examples
Modules
Python
Resources
Versions
module.map
What I have tried so far:
Check that Xcode CL Tools are already installed running $ xcode-select --install
Try to use pip3 instead of pip2 (I have installed python 3.6 with Homebrew), but I get the same error message.
Do you have any idea? I have read other posts but they did not solve my problem.
Thank you
Had a very similar problem on my High Sierra (10.13.5) setup with Xcode CLI tools installed; for me the Python.h was found in /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
(Some resources say the location can be found via find /usr/local/Cellar/ -name Python.h, however this seems not work if your python was not installed with brew.)
Add the location to your C include path, or at compile time as a flag by setting -I flag as such: -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7.
The part that tripped me up was the import statement should then look like: #include <Python.h> rather than #include <Python/Python.h> if your Python.h is directly in the python2.7 directory.
Hope that helps,
I am trying to install pycrypto on my Windows machine. I have mingw installed and distutils is using it. The error here is what I am getting:
In file included from C:\Python27\include/pyconfig.h:68:0,
from C:\Python27\include/Python.h:8,
from src/winrand.c:33:
c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:301:1: error: unknown type name 'off64_t'
c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:301:36: error: unknown type name 'off64_t'
c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:302:1: error: unknown type name 'off64_t'
c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:302:39: error: unknown type name 'off64_t'
src/winrand.c:38:0: warning: "_WIN32_WINNT" redefined [enabled by default]
In file included from c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/_mingw.h:35:0,
from c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/io.h:27,
from C:\Python27\include/pyconfig.h:68,
from C:\Python27\include/Python.h:8,
from src/winrand.c:33:
c:\mingw\bin../lib/gcc/mingw32/4.7.2/../../../../include/sdkddkver.h:154:0: note: this is the location of the previous definition
error: command 'gcc' failed with exit status 1
Edit: I found this, but I am not sure how to fix pip install with it.
http://ac-archive.sourceforge.net/largefile/largefiles_win32.print.html
I met the same problem when building Fabric in windows.
The reason was mingw32's gcc config when building pycrypto.
In configure, gcc's setting -std is set to c99.
But, when -std is c99, __STRICT_ANSI__ is defined and typedef _off_t off_t and _off64_t off64_t in "sys/types.h" are skipped.
I succeeded to build pycrypto by modifying sys/types.h in mingw32 but it was brutal.
Create a virtualenv (I usually put all mine on the desktop)
Download the binary of pycrypto (matching your installed python version and architecture - no support for python3 as of now)
- http://www.voidspace.org.uk/python/modules.shtml
navigate to the easy_install executable (under Lib\site-packages) within the virtualenv folder you created and run the pycrypto install: easy_install C:\path\to\the\download\pycrypto-2.6.win-amd64-py2.7.exe