We're Hiring!

python modules and pip

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

python modules and pip

Postby bulwynkl » Fri Jul 24, 2015 5:10 am

Hi Folks,

I'm facing some issues installing the required python modules via pip....

first question - what user should I be using to install the python modules?
root?
omero?
pvdb? <- i.e. me...

when I run

pip install numexpr==1.4.2
pip install tables==2.4.0

as me, I get an error:
Failed building wheel for tables
and it fails.

if I run using sudo, I still get the same error but it completes....

Is teh error about not building wheels something to be concerned about?
aka Dr Paul van den Bergen
bulwynkl
 
Posts: 13
Joined: Mon Mar 23, 2015 6:38 am
Location: WEHI, Melbourne, Austalia

Re: python modules and pip

Postby jmoore » Fri Jul 24, 2015 6:45 am

Hi Paul,

first question - what user should I be using to install the python modules?


which platform is this? If you are using pip without any options, you'll need to have a root level account. You can also install locally with `pip install --user` or you can install into a virtualenv to keep things tidy.

as me, I get an error:
Failed building wheel for tables



Can you paste us more of the error? Perhaps you don't have HDF5 installed? Does this work?

Code: Select all
python -c "import tables; print tables.__file__"


Cheers,
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: python modules and pip

Postby bulwynkl » Fri Jul 24, 2015 8:48 am

what do you mean, you can't read my mind????

Centos 6.6

I'm pretty sure the answer to my "which user" quesiton is...

vandenbergen.p$ sudo pip install <module>

because it completes, even with errors....

I just wanted to be sure...

short version - I'm installing OMERO - what's the official method (which user) to install python modules?

e.g.

python -c "import tables; print tables.__file__"
/usr/lib64/python2.6/site-packages/tables/__init__.pyc

works, which doesn't surprise me, since the tables module seemed to build OK as root...

also,
sudo -u omero python -c "import tables; print tables.__file__"
[sudo] password for vandenbergen.p:
/usr/lib64/python2.6/site-packages/tables/__init__.pyc

which probably answers my previous question...


wrt error encountered during pip install:

I uninstalled and reinstalled - here is what the error looks like (for both numexpr==1.4.2 and tables==2.4.0)
as per http://www.openmicroscopy.org/site/supp ... centos6.sh

pip install numexpr==1.4.2
Collecting numexpr==1.4.2
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/late ... ormwarning.
InsecurePlatformWarning
Using cached numexpr-1.4.2.tar.gz
Building wheels for collected packages: numexpr
Running setup.py bdist_wheel for numexpr
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-75KQMN/numexpr/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpK8yAILpip-wheel-:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help

error: invalid command 'bdist_wheel'

----------------------------------------
Failed building wheel for numexpr
Failed to build numexpr
Installing collected packages: numexpr
Running setup.py install for numexpr
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-75KQMN/numexpr/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-XETV9i-record/install-record.txt --single-version-externally-managed --compile:
Warning: Assuming default configuration (numexpr/tests/{setup_tests,setup}.py was not found)
Appending numexpr.tests configuration to numexpr
Ignoring attempt to set 'name' (from 'numexpr' to 'numexpr.tests')
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building extension "numexpr.interpreter" sources
build_src: building npy-pkg config files
running build_py
creating build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/numexpr
copying numexpr/utils.py -> build/lib.linux-x86_64-2.6/numexpr
copying numexpr/necompiler.py -> build/lib.linux-x86_64-2.6/numexpr
copying numexpr/__init__.py -> build/lib.linux-x86_64-2.6/numexpr
copying numexpr/version.py -> build/lib.linux-x86_64-2.6/numexpr
copying numexpr/expressions.py -> build/lib.linux-x86_64-2.6/numexpr
copying numexpr/cpuinfo.py -> build/lib.linux-x86_64-2.6/numexpr
copying build/src.linux-x86_64-2.6/numexpr/__config__.py -> build/lib.linux-x86_64-2.6/numexpr
creating build/lib.linux-x86_64-2.6/numexpr/tests
copying ./numexpr/tests/test_numexpr.py -> build/lib.linux-x86_64-2.6/numexpr/tests
copying ./numexpr/tests/__init__.py -> build/lib.linux-x86_64-2.6/numexpr/tests
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'numexpr.interpreter' extension
compiling C sources
C compiler: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC

creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/numexpr
compile options: '-I/usr/lib64/python2.6/site-packages/numpy/core/include -I/usr/include/python2.6 -c'
extra options: '-funroll-all-loops'
gcc: numexpr/interpreter.c
gcc -pthread -shared build/temp.linux-x86_64-2.6/numexpr/interpreter.o -L/usr/lib64 -lpython2.6 -o build/lib.linux-x86_64-2.6/numexpr/interpreter.so
running scons
running install_lib
creating /usr/lib64/python2.6/site-packages/numexpr
error: could not create '/usr/lib64/python2.6/site-packages/numexpr': Permission denied

----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-75KQMN/numexpr/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-XETV9i-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-75KQMN/numexpr
aka Dr Paul van den Bergen
bulwynkl
 
Posts: 13
Joined: Mon Mar 23, 2015 6:38 am
Location: WEHI, Melbourne, Austalia

Re: python modules and pip

Postby jmoore » Mon Jul 27, 2015 9:06 am

Hi Paul,

how did you install pip? Using ez_setup.py? Using EPEL?

For EPEL, the following as root works:

* yum install wget
* wget https://dl.fedoraproject.org/pub/epel/e ... noarch.rpm
* yum install epel-release-latest-6.noarch.rpm
* yum install gcc gcc-c++ hdf5-devel python-pip python-devel
* pip install numexpr
* pip install tables

See https://github.com/ome/omero-install/blob/master/linux/dependencies-centos6.sh for a(n overly-) complete example. (The differences in versions there are due to the source of numpy.)

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest