We're Hiring!

Figure and PDF export

General user discussion about using the OMERO platform to its fullest. 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

There are workflow guides for various OMERO functions on our help site - http://help.openmicroscopy.org

You should find answers to any basic questions about using the clients there.

Re: Figure and PDF export

Postby phm » Mon Aug 01, 2016 12:40 pm

Hi Kenneth,

Code: Select all
[omero@omero ~]$ ls -l /usr/local/bin/ | grep -E "pip|python"
-rwxr-xr-x. 1 root root   213 19 juil. 15:52 pip
-rwxr-xr-x. 1 root root   213 19 juil. 15:52 pip2
-rwxr-xr-x. 1 root root   213 19 juil. 15:52 pip2.7
lrwxrwxrwx. 1 root root    24  4 nov.   2015 python -> /usr/local/bin/python2.7
-rwxr-xr-x. 1 root root  9744  4 nov.   2015 python2.7
-rwxr-xr-x. 1 root root  1687  4 nov.   2015 python2.7-config

The last time you ran the suggested reinstall reportlab, it was as the root user.

Let's see if what happens if we try that as the omero user:

Yes

Code: Select all
[omero@omero ~]$ pip install reportlab
Collecting reportlab
/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/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/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading reportlab-3.3.0.tar.gz (2.0MB)
    100% |████████████████████████████████| 2.0MB 107kB/s
Requirement already satisfied (use --upgrade to upgrade): pillow>=2.4.0 in /opt/rh/python27/root/usr/lib64/python2.7/site-packages (from reportlab)
Requirement already satisfied (use --upgrade to upgrade): pip>=1.4.1 in /opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg (from reportlab)
Collecting setuptools>=2.2 (from reportlab)
  Downloading setuptools-25.1.1-py2.py3-none-any.whl (442kB)
    100% |████████████████████████████████| 446kB 949kB/s
Installing collected packages: setuptools, reportlab
  Found existing installation: setuptools 0.9.8
    Uninstalling setuptools-0.9.8:
Exception:
Traceback (most recent call last):
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/opt/rh/python27/root/usr/lib64/python2.7/shutil.py", line 302, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/opt/rh/python27/root/usr/bin/easy_install'
/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/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/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


Code: Select all
[omero@omero ~]$ pip install --upgrade pip
/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/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/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Collecting pip
  Using cached pip-8.1.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
Exception:
Traceback (most recent call last):
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/opt/rh/python27/root/usr/lib64/python2.7/shutil.py", line 302, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/opt/rh/python27/root/usr/bin/pip'
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

It is a vicious circle :roll:

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Figure and PDF export

Postby kennethgillen » Mon Aug 01, 2016 1:00 pm

Since the OMERO user doesn't have permission to run alter that python install...

Let's see who owns the second python install in /opt:

As root:

Code: Select all
[root@omero omero]# ls -al /opt/rh/python27/root/usr/bin/


And only if all of that is owned by root: let's try running that pip directly:

Code: Select all
[root@omero omero]# /opt/rh/python27/root/usr/bin/pip install reportlab


Since that second python install is there, we may have to be more cautious with regards to how we execute the pip install.
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Figure and PDF export

Postby phm » Mon Aug 01, 2016 1:18 pm

kennethgillen wrote:Since the OMERO user doesn't have permission to run alter that python install...

Let's see who owns the second python install in /opt:

As root:

Code: Select all
[root@omero omero]# ls -al /opt/rh/python27/root/usr/bin/


Code: Select all
[root@omero omero]# ls -al /opt/rh/python27/root/usr/bin/
total 224
dr-xr-xr-x.  2 root root  4096  6 nov.   2015 .
drwxr-xr-x. 13 root root  4096  5 nov.   2015 ..
-rwxr-xr-x.  1 root root   538  5 nov.   2015 createfontdatachunk.py
-rwxr-xr-x.  1 root root   330  5 nov.   2015 django-admin
-rwxr-xr-x.  1 root root   210  5 nov.   2015 django-admin.py
-rwxr-xr-x.  1 root root   342 11 juil.  2014 easy_install
-rwxr-xr-x.  1 root root   350 11 juil.  2014 easy_install-2.7
-rwxr-xr-x.  1 root root  1528  5 nov.   2015 enhancer.py
-rwxr-xr-x.  1 root root  2459  5 nov.   2015 explode.py
-rwxr-xr-x.  1 root root   730  5 nov.   2015 f2py2
-rwxr-xr-x.  1 root root   662  5 nov.   2015 gifmaker.py
-rwxr-xr-x.  1 root root   241  6 nov.   2015 gunicorn
-rwxr-xr-x.  1 root root   243  6 nov.   2015 gunicorn_django
-rwxr-xr-x.  1 root root   243  6 nov.   2015 gunicorn_paster
-rwxr-xr-x.  1 root root   318 11 juil.  2014 nosetests
-rwxr-xr-x.  1 root root   326 11 juil.  2014 nosetests-2.7
-rwxr-xr-x.  1 root root  2055  5 nov.   2015 painter.py
-rwxr-xr-x.  1 root root  2379  5 nov.   2015 pilconvert.py
-rwxr-xr-x.  1 root root 15524  5 nov.   2015 pildriver.py
-rwxr-xr-x.  1 root root  2687  5 nov.   2015 pilfile.py
-rwxr-xr-x.  1 root root  1048  5 nov.   2015 pilfont.py
-rwxr-xr-x.  1 root root  2415  5 nov.   2015 pilprint.py
-rwxr-xr-x.  1 root root   303  5 nov.   2015 pip
-rwxr-xr-x.  1 root root   305  5 nov.   2015 pip2
-rwxr-xr-x.  1 root root   309  5 nov.   2015 pip2.7
-rwxr-xr-x.  1 root root  2194  5 nov.   2015 player.py
-rwxr-xr-x.  1 root root   318  5 nov.   2015 pt2to3
-rwxr-xr-x.  1 root root   318  5 nov.   2015 ptdump
-rwxr-xr-x.  1 root root   322  5 nov.   2015 ptrepack
-rwxr-xr-x.  1 root root   318  5 nov.   2015 pttree
-rwxr-xr-x.  1 root root    99 10 juil.  2014 pydoc
-rwxr-xr-x.  1 root root   325 30 oct.   2013 pygmentize
lrwxrwxrwx.  1 root root     7  5 nov.   2015 python -> python2
lrwxrwxrwx.  1 root root     9  5 nov.   2015 python2 -> python2.7
-rwxr-xr-x.  1 root root  4864 10 juil.  2014 python2.7
-rwxr-xr-x.  1 root root  1856 10 juil.  2014 python2.7-config
lrwxrwxrwx.  1 root root    16  5 nov.   2015 python2-config -> python2.7-config
lrwxrwxrwx.  1 root root    14  5 nov.   2015 python-config -> python2-config
-rwxr-xr-x.  1 root root   615 11 juil.  2014 rst2html
-rwxr-xr-x.  1 root root   812 11 juil.  2014 rst2latex
-rwxr-xr-x.  1 root root   621 11 juil.  2014 rst2man
-rwxr-xr-x.  1 root root   785 11 juil.  2014 rst2odt
-rwxr-xr-x.  1 root root  1719 11 juil.  2014 rst2odt_prepstyles
-rwxr-xr-x.  1 root root   622 11 juil.  2014 rst2pseudoxml
-rwxr-xr-x.  1 root root   658 11 juil.  2014 rst2s5
-rwxr-xr-x.  1 root root   807 11 juil.  2014 rst2xetex
-rwxr-xr-x.  1 root root   623 11 juil.  2014 rst2xml
-rwxr-xr-x.  1 root root   691 11 juil.  2014 rstpep2html
-rwxr-xr-x.  1 root root   331 30 oct.   2013 sphinx-apidoc
-rwxr-xr-x.  1 root root   333 30 oct.   2013 sphinx-autogen
-rwxr-xr-x.  1 root root   329 30 oct.   2013 sphinx-build
-rwxr-xr-x.  1 root root   339 30 oct.   2013 sphinx-quickstart
-rwxr-xr-x.  1 root root  1815  5 nov.   2015 thresholder.py
-rwxr-xr-x.  1 root root   988  5 nov.   2015 viewer.py
-rwxr-xr-x.  1 root root   340 30 oct.   2013 virtualenv
-rwxr-xr-x.  1 root root   348 30 oct.   2013 virtualenv-2.7

And only if all of that is owned by root: let's try running that pip directly:

Code: Select all
[root@omero omero]# /opt/rh/python27/root/usr/bin/pip install reportlab


Since that second python install is there, we may have to be more cautious with regards to how we execute the pip install.


Code: Select all
[root@omero omero]# /opt/rh/python27/root/usr/bin/pip install reportlab
Traceback (most recent call last):
  File "/opt/rh/python27/root/usr/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/opt/distribute-0.7.3/pkg_resources.py", line 2993, in <module>
    parse_requirements(__requires__), Environment()
  File "/opt/distribute-0.7.3/pkg_resources.py", line 624, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==7.1.2

Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Figure and PDF export

Postby kennethgillen » Mon Aug 01, 2016 4:18 pm

Hi Philippe,

Let's go back to basics and acquire some of the "usual suspect" debugging information.

If you could please supply us with the following: (via attachments here, or via our QA system http://qa.openmicroscopy.org.uk/qa/upload/ as a zip file)

As the OMERO user:

  • Output of bin/omero admin diagnostics
  • Output of bin/omero config get --hide-password (Blank out any passwords)

Depending on the webserver you are using:
  • Apache configuration files (CentOS/RHEL) /etc/httpd/ (Including subdirectories, omit any SSL certificates)
  • Apache configuration files (Debian) /etc/apache2/ (Including subdirectories, omit any SSL certificates)
  • Nginx configuration files (CentOS/RHEL) /etc/nginx/ (Including subdirectories, omit any SSL certificates)
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Figure and PDF export

Postby phm » Tue Aug 02, 2016 8:11 am

kennethgillen wrote:Hi Philippe,

Let's go back to basics and acquire some of the "usual suspect" debugging information.

If you could please supply us with the following: (via attachments here, or via our QA system http://qa.openmicroscopy.org.uk/qa/upload/ as a zip file)

As the OMERO user:

  • Output of bin/omero admin diagnostics
  • Output of bin/omero config get --hide-password (Blank out any passwords)

Depending on the webserver you are using:
  • Apache configuration files (CentOS/RHEL) /etc/httpd/ (Including subdirectories, omit any SSL certificates)
  • Apache configuration files (Debian) /etc/apache2/ (Including subdirectories, omit any SSL certificates)
  • Nginx configuration files (CentOS/RHEL) /etc/nginx/ (Including subdirectories, omit any SSL certificates)

Hi Kenneth,
these are files that you want.

Philippe
Attachments
config_files.tar.gz
(2.91 KiB) Downloaded 137 times
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Figure and PDF export

Postby kennethgillen » Tue Aug 02, 2016 9:58 am

Hi Philippe,

Thanks for that.

Could you please also add OMERO user's ~/.bashrc and ~/.bash_profile

Thanks,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Figure and PDF export

Postby kennethgillen » Tue Aug 02, 2016 10:06 am

Hi Philippe,

So I've worked out your has "SCL" python 2.7 installed.

You may be able use "pip2.7" instead of "pip" as the OMERO user.

Please give that a try.

As the OMERO user:
Code: Select all
pip2.7 remove reportlab
pip2.7 install reportlab


Thanks,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: Figure and PDF export

Postby atarkowska » Tue Aug 02, 2016 10:20 am

HI Philippe,

As you are using SCL python isn't not enougth just

Code: Select all
source /opt/rh/python27/enable
pip install reportlab markdown


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

Re: Figure and PDF export

Postby phm » Thu Aug 04, 2016 2:15 pm

kennethgillen wrote:Hi Philippe,

So I've worked out your has "SCL" python 2.7 installed.

You may be able use "pip2.7" instead of "pip" as the OMERO user.

Please give that a try.

As the OMERO user:
Code: Select all
pip2.7 remove reportlab
pip2.7 install reportlab


Hi Kenneth,
Code: Select all
[omero@omero ~]$ pip2.7 uninstall reportlab
Cannot uninstall requirement reportlab, not installed
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


Code: Select all
[omero@omero ~]$ pip2.7 install reportlab
Collecting reportlab
/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/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/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Using cached reportlab-3.3.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pillow>=2.4.0 in /opt/rh/python27/root/usr/lib64/python2.7/site-packages (from reportlab)
Requirement already satisfied (use --upgrade to upgrade): pip>=1.4.1 in /opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg (from reportlab)
Collecting setuptools>=2.2 (from reportlab)
  Downloading setuptools-25.1.4-py2.py3-none-any.whl (443kB)
    100% |████████████████████████████████| 446kB 445kB/s
Installing collected packages: setuptools, reportlab
  Found existing installation: setuptools 0.9.8
    Uninstalling setuptools-0.9.8:
Exception:
Traceback (most recent call last):
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/opt/rh/python27/root/usr/lib64/python2.7/shutil.py", line 302, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/opt/rh/python27/root/usr/bin/easy_install'
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

Re: Figure and PDF export

Postby phm » Thu Aug 04, 2016 2:16 pm

atarkowska wrote:HI Philippe,

As you are using SCL python isn't not enougth just

Code: Select all
source /opt/rh/python27/enable
pip install reportlab markdown


Ola


Hi Ola

Code: Select all
[omero@omero ~]$ source /opt/rh/python27/enable
[omero@omero ~]$ pip install reportlab markdown
Collecting reportlab
  Using cached reportlab-3.3.0.tar.gz
Collecting markdown
/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/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/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading Markdown-2.6.6.zip (412kB)
    100% |████████████████████████████████| 413kB 218kB/s
Requirement already satisfied (use --upgrade to upgrade): pillow>=2.4.0 in /opt/rh/python27/root/usr/lib64/python2.7/site-packages (from reportlab)
Requirement already satisfied (use --upgrade to upgrade): pip>=1.4.1 in /opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg (from reportlab)
Collecting setuptools>=2.2 (from reportlab)
  Using cached setuptools-25.1.4-py2.py3-none-any.whl
Installing collected packages: setuptools, reportlab, markdown
  Found existing installation: setuptools 0.9.8
    Uninstalling setuptools-0.9.8:
Exception:
Traceback (most recent call last):
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/opt/rh/python27/root/usr/lib64/python2.7/shutil.py", line 302, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/opt/rh/python27/root/usr/bin/easy_install'
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


Philippe
phm
 
Posts: 185
Joined: Tue Mar 19, 2013 3:39 pm

PreviousNext

Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest