install pygraphviz on anaconda error - python

I try to install pygraphviz on Anaconda. I have done everything I found:
- install graphviz.
- install mingw.
- change values in the setup.py for pygraphviz as below:
include_dirs = 'C:/Program Files (x86)/Graphviz2.38/include/graphviz'
library_dirs = 'C:/Program Files (x86)/Graphviz2.38/lib'
- run python setup.py build -c mingw32 install.
After step 4, I got the following error:
running install
running build
running build_py
running build_ext
building 'pygraphviz._graphviz' extension
C:\MinGW\bin\gcc.exe -mdll -O -Wall -DGVDLL "-IC:/Program Files (x86)/Graphviz2.38/include/graphviz" -IC:\Users\garre_000\Anaconda3\
include -IC:\Users\garre_000\Anaconda3\include -c pygraphviz/graphviz_wrap.c -o build\temp.win-amd64-3.4\Release\pygraphviz\graphviz
_wrap.o
pygraphviz/graphviz_wrap.c:2954:29: fatal error: graphviz/cgraph.h: No such file or directory
#include "graphviz/cgraph.h"
^
compilation terminated.
error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1
Can anyone give me some advice ?

I just faced the same problem. The include path is incorrect. Use
include_dirs = 'C:/Program Files (x86)/Graphviz2.38/include'
instead. Otherwise you get
'C:/Program Files (x86)/Graphviz2.38/include/graphviz/graphviz/cgraph.h'

Related

biopython installation: error: command 'gcc' failed with exit status 1

I am trying to install the python package biopython from source on my Macbook pro OSX 10.9.4,
I run python setup.py build in the terminal and receive this
running build
running build_py
running build_ext
building 'Bio.cpairwise2' extension
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
Please check your Xcode installation
gcc -DNDEBUG -g -O3 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -Qunused-arguments -Qunused-arguments -I/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c Bio/cpairwise2module.c -o build/temp.macosx-10.6-x86_64-2.7/Bio/cpairwise2module.o
clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.6.sdk'
In file included from Bio/cpairwise2module.c:12:
/Applications/Canopy.app/appdata/canopy-1.4.1.1975.macosx- x86_64/Canopy.app/Contents/include/python2.7/Python.h:33:10: fatal error:
'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
error: command 'gcc' failed with exit status 1
I checked that Xcode should be properly installed and working
You should be using pip. Try:
pip install biopython
Uninstalled Canopy and everything worked like a charm...
Try installing the Biopython version available from the Canopy "Package Manager" > "Available Packages" > "Canopy Packages".
This way, I seem to have solved a similar problem while installing Pyensembl, that also installs Biopython.

Fatal error when installing gecode-python

I'm trying to install a python wrapper over constraint programming library Gecode called python-gecode
https://pypi.python.org/pypi/gecode-python/
No matter how I install it I get same error "No such file or directory". Here is setup script output:
running install
running build
running build_py
running build_ext
building 'gecode._gecode' extension
C:\MinGW32-xy\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DDISJUNCTOR "-IC:\Program Files\Gecode\include" -IC:\Python27\include -IC:\Python27\PC -c _gecode.cc -o build\temp.win32-2.7\Release\_gecode.o
_gecode.cc:5:24: fatal error: 4.2.1: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1"
But the _gecode.cc is there in the folder. I don't really understand what's the problem. I tried installing with pip, easy_install, manual install and everytime I get this error.
Any ideas what's causing it?
Thanks!
Gecode-Python supports only up to version 4.0.0 of Gecode, so use that version instead of 4.2.1.

M2Crypto Error Installing on Windows

I'm trying to install the M2Crypto on Python26 in Windows, but I am getting the below error.
error: command 'swig.exe' failed: No such file or directory
This error occurs both using the "Easy Install" or "PIP Install" command. Follows the Log:
running build
running build_py
running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig.exe -python -IC:\Python26\include -IC:\Python26\PC
-Ic:\pkg\include -includeall -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
error: command 'swig.exe' failed: No such file or directory
Any Help?
This worked for me: (using winpython2.7)
pip install M2CryptoWin32
reference:
https://github.com/dsoprea/M2CryptoWin32
Putting this in answer format:
You could try to install a binary build from http://chandlerproject.org/Projects/MeTooCrypto
from mata's comment that resolved OP's issue

Python RRDtool installation issue on windows 7

Hi guys i'm new to rrdtool , i want to use rrdtool for one of my python projects, i'm trying to install rrdtool by typing this script in my command prompt
"python setup.py install build --compiler=mingw32 "
this is the output that i get :
running install
running build
running build_ext
running build_configure
building 'rrdtoolmodule' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Irrdtool-1.4.7/src -IC:\Python2
7\include -IC:\Python27\PC -c rrdtool-1.4.7/bindings/python/rrdtoolmodule.c -o b
uild\temp.win32-2.7\Release\rrdtool-1.4.7\bindings\python\rrdtoolmodule.o
rrdtool-1.4.7/bindings/python/rrdtoolmodule.c:41:30: fatal error: ../../rrd_config.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
i have searched for a solution but had no success.
pls can anyone help !!

Error during PyCUDA installation

I tried to install PyCUDA using these instructions: http://wiki.tiker.net/PyCuda/Installation/Linux
and at the point 3 I was compiling with:
su -c "make install"
have this output from console:
running install
running bdist_egg
running egg_info
writing requirements to pycuda.egg-info/requires.txt
writing pycuda.egg-info/PKG-INFO
writing top-level names to pycuda.egg-info/top_level.txt
writing dependency_links to pycuda.egg-info/dependency_links.txt
reading manifest file 'pycuda.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pycuda.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building '_driver' extension
gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -fwrapv -Wall -g -fPIC -DPYGPU_PACKAGE=pycuda -DHAVE_CURAND=1 -DBOOST_PYTHON_SOURCE=1 -DPYGPU_PYCUDA=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -Dboost=pycudaboost -Isrc/cpp -Ibpl-subset/bpl_subset -I/usr/local/cuda/include -I/usr/lib/python3.2/site-packages/numpy/core/include -I/usr/lib/python3.2/site-packages/numpy/core/include -I/usr/include/python3.2mu -c src/cpp/cuda.cpp -o build/temp.linux-x86_64-3.2/src/cpp/cuda.o
Inf ile included from src/cpp/cuda.cpp:1:0:
src/cpp/cuda.hpp:12:18: fatal error: cuda.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
What should I do?
EDIT: My OS is: Arch Linux 3.3.2.1. GPU: Nvidia GF 9600M GS
Instead of su -c "make install" try sudo su - (to become root), and then, as root: make install (after navigating to the right directory)
This one full command worked for me:
sudo pip3 install --global-option=build_ext --global-option="-I/usr/local/cuda/include" --global-option="-L/usr/local/cuda/lib64" pycuda

Categories

Resources