Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install centrosome tries compiling *.c #48

Open
LeeKamentsky opened this issue Dec 9, 2015 · 8 comments
Open

pip install centrosome tries compiling *.c #48

LeeKamentsky opened this issue Dec 9, 2015 · 8 comments

Comments

@LeeKamentsky
Copy link

From Christian Tischner:
(pip install centrosome)

now i did it again with the --system-site-packages and it ran quite far....till i got below error. I ran pip being inside the virtualenv...do i maybe have to explicitly tell it that it should install everything into the virtualenv and not globally?!

building '*' extension

gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/g/software/linux/pack/python-2.7/lib/python2.7/site-packages/numpy/core/include -Icentrosome/include -I/g/software/linux/pack/python-2.7/include/python2.7 -c centrosome/.c -o build/temp.linux-x86_64-2.7/centrosome/.o

gcc: centrosome/*.c: No such file or directory

gcc: no input files

error: command 'gcc' failed with exit status 1

@LeeKamentsky
Copy link
Author

I think the culprit is here:
https://github.com/CellProfiler/centrosome/blob/master/setup.py#L82
I will fix.

@LeeKamentsky
Copy link
Author

I tried "pip install centrosome" on our Centos 6.5 / Python 2.7 here and it worked. I am guessing that there is a difference in the way setuptools parses the cython extension commands between mine and yours.

Can you do:

pip freeze
python -c "import setuptools;print setuptools.version"

LeeKamentsky pushed a commit that referenced this issue Dec 9, 2015
@LeeKamentsky
Copy link
Author

You can try out my fix like this:

pip install https://github.com/CellProfiler/centrosome/archive/issues/48.tar.gz#egg=centrosome

@tischi
Copy link
Contributor

tischi commented Dec 10, 2015

my pip version is 7.1.2
my setuptools version is 0.6.c11

pip install https://github.com/CellProfiler/centrosome/archive/issues/48.tar.gz#egg=centrosome

gave the following, different error:

gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/g/software/linux/pack/python-2.7/lib/python2.7/site-packages/numpy/core/include -Icentrosome/include -I/g/software/linux/pack/python-2.7/include/python2.7 -c centrosome/src/_cpmorphology.c -o build/temp.linux-x86_64-2.7/centrosome/src/_cpmorphology.o
In file included from /g/software/linux/pack/python-2.7/include/python2.7/Python.h:8,
                 from centrosome/src/_cpmorphology.c:24:
/g/software/linux/pack/python-2.7/include/python2.7/pyconfig.h:1149:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/stdlib.h:25,
                 from centrosome/src/_cpmorphology.c:22:
/usr/include/features.h:213:1: warning: this is the location of the previous definition
centrosome/src/_cpmorphology.c:27: warning: ‘to_stdout’ defined but not used
gcc -pthread -shared build/temp.linux-x86_64-2.7/centrosome/src/_cpmorphology.o -L/g/software/linux/pack/python-2.7/lib -lpython2.7 -o build/lib.linux-x86_64-2.7/_cpmorphology.so
building '_convex_hull' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/g/software/linux/pack/python-2.7/lib/python2.7/site-packages/numpy/core/include -Icentrosome/include -I/g/software/linux/pack/python-2.7/include/python2.7 -c centrosome/_convex_hull.c -o build/temp.linux-x86_64-2.7/centrosome/_convex_hull.o
gcc: centrosome/_convex_hull.c: No such file or directory
gcc: no input files
error: command 'gcc' failed with exit status 1

@tischi
Copy link
Contributor

tischi commented Dec 10, 2015

after attempting to install centrosome i ran

pip freeze

cycler==0.9.0
Cython==0.14.1
decorator==4.0.5
docutils==0.7
fpconst==0.7.2
h5py==1.3.1
hcluster==0.2.0
Jinja2==2.5.5
LIBSVM==2.89
matplotlib==1.5.0
mpi4py==1.2.2
MySQL-python==1.2.3
netCDF4==0.9.1
networkx==1.10
nose==1.0.0
numpy==1.6.0
PIL==1.1.7
Pillow==3.0.0
PyAMF==0.6.1
pyarmor==2.5.2
Pygments==1.4
pyparsing==2.0.6
python-dateutil==2.4.2
pytz==2015.7
PyYAML==3.10
rpy2==2.2.6.dev20120914
scikit-image==0.11.3
scikit-learn==0.9
scipy==0.9.0
six==1.10.0
SOAPpy==0.12.5
Sphinx==1.0.7
SQLAlchemy==0.7.5
virtualenv==1.7
wstools==0.3

@LeeKamentsky
Copy link
Author

@tischi your setuptools is ancient - from 2009. Cython is pretty old too. I would upgrade both inside your virtualenv. The directions for setuptools are here: https://pypi.python.org/pypi/setuptools

wget https://bootstrap.pypa.io/ez_setup.py -O - | python

Cython can be upgraded like this:

pip install --upgrade --no-deps Cython

I think you should be good after that.

@tischi
Copy link
Contributor

tischi commented Dec 10, 2015

now it worked!

Successfully installed centrosome-1.0.3

however, i had to slightly change the upgrade of setuptools:

update setuptools

wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py --insecure

@ssyip
Copy link

ssyip commented Aug 7, 2017

Hi,

I am trying to install centrosome on window with python 3.6. , but got the following error (attached) from "pip install centrosome". Does anyone know how to fix it? Thank you so much!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants