We're Hiring!

CentOS 7/Ice 36 prereq installation question

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.

CentOS 7/Ice 36 prereq installation question

Postby jimlong » Tue Aug 30, 2016 7:59 pm

On the page http://www.openmicroscopy.org/site/support/omero5.2/sysadmins/unix/server-centos7-ice36.html#installing-prerequisites at the bottom of the first code box is the command:

Code: Select all
pip install -r `dirname $0`/requirements.txt


What is the value of $0 presumed to be in this context? When I run those commands, $0 is the shell, and in particular evaluates to "-bash" so the above command returns the error:

Code: Select all
[root@omero ~]# pip install -r `dirname $0`/requirements.txt
dirname: invalid option -- 'b'
Try 'dirname --help' for more information.
Could not open requirements file: [Errno 2] No such file or directory: '/requirements.txt'


None of the previous commands returns any error, so I am not sure where requirements.txt is supposed to come from, nor what value $0 is expected to have. Obviously $0 would be the path and filename of a file that lives in the same directory as requirements.txt, but what?

Also,

Code: Select all
find / -name requirements.txt


does not find any file matching that name.

Thanks for any enlightenment!

Jim
jimlong
 
Posts: 13
Joined: Tue Aug 16, 2016 9:12 pm

Re: CentOS 7/Ice 36 prereq installation question

Postby Dominik » Wed Aug 31, 2016 8:16 am

Hi Jim,

the link to the requirements.txt is mentioned a few lines further down, it's http://www.openmicroscopy.org/site/support/omero5.2/_downloads/requirements.txt.
It basically only contains the pillow dependency. We could add that directly to the pip install command, too. We certainly have to change the
Code: Select all
dirname $0
part, that doesn't make sense.

Regards,
Dominik
User avatar
Dominik
Team Member
 
Posts: 149
Joined: Mon Feb 10, 2014 11:26 am

Re: CentOS 7/Ice 36 prereq installation question

Postby jimlong » Thu Sep 08, 2016 7:01 pm

I hesitate to resurrect an old thread, but the subject is still germane, and my comment is largely in the form of uncertainty regarding the documentation.

I am continuing to pursue the installation of OMERO.server-5.2.5-ice36-b28 on CentOS 7. Near the top of the page at:

https://www.openmicroscopy.org/site/support/omero5.2/sysadmins/unix/install-web/install-apache.html

is the command:

Code: Select all
$ pip install -r share/web/requirements-py27-apache.txt


The page does not explicitly say under which user account that command should be executed, but I presume from the '$' prompt that it is an unprivileged account, and further that it would be the omero account. But 'pip install' is trying to install into directories where omero does not have rights:

Code: Select all
$ pip install -r share/web/requirements-py27-apache.txt
Collecting Django<1.9,>=1.8 (from -r share/web/requirements-py27-apache.txt (line 6))
  Downloading Django-1.8.14-py2.py3-none-any.whl (6.2MB)
    100% |ââââââââââââââââââââââââââââââââ| 6.2MB 218kB/s
Installing collected packages: Django
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 742, in install
    **kwargs
  File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 831, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files
    isolated=self.isolated,
  File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 346, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 317, in clobber
    ensure_dir(destdir)
  File "/usr/lib/python2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/usr/lib64/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/django'


I have taken the obvious workaround and run the command as root instead. Is that correct, and if so, should the Django installation instructions reflect that? Is there a better solution?

Thank you!

Jim
jimlong
 
Posts: 13
Joined: Tue Aug 16, 2016 9:12 pm

Re: CentOS 7/Ice 36 prereq installation question

Postby rleigh » Thu Sep 08, 2016 7:24 pm

Dear Jim,

I think this is perhaps another place the documentation could be clearer.

There are two choices here:

  • Run as root, and install into the system paths
  • Run as a normal user, and install into a virtualenv

If you use the latter step, you can create and enter a virtualenv prior to running pip, and this can be done without any special privileges. It also means the setup is self-contained and won't interfere with anything else on the system, i.e. you can have it dedicated to OMERO and/or OMERO.web. It would require activating the virtualenv before starting up the server.

If you're new to virtualenv, there's a good tutorial here which explains things: http://docs.python-guide.org/en/latest/dev/virtualenvs/

Regards,
Roger
User avatar
rleigh
 
Posts: 217
Joined: Tue Mar 13, 2012 11:45 am

Re: CentOS 7/Ice 36 prereq installation question

Postby atarkowska » Thu Sep 08, 2016 7:48 pm

Hi Jim,

Regarding Roger's suggestion about virtualenv, we are in the process of separating OMERO.web and simplifying deployment in isolation in virtualenv. As that is plan for 5.3 we have sample walkthrough. Would you like to have a look at give us a feedback?

(keep in mind it is still under construction and will be cleaned up soon)
http://www.openmicroscopy.org/site/supp ... ce3.6.html

Please note that since 5.3 OMERO.web we will recommand to deploy separately from the server (e.g. different VM).

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest

cron