Question: Galaxy fails on sh run.sh detects python2.6 but I also have anaconda python 2.7
1
gravatar for blewettn
2.4 years ago by
blewettn10
blewettn10 wrote:

I can't get a straight answer. Many people have this problem, I would like to find out how to point Galaxy at python 2.7.

Can I just modify a component of the run.sh script, Galaxy fails about halfway through, below is the readout:

[root@hdlxnextseq01955786 galaxy]# sh run.sh
Collecting bx-python==0.7.3 (from -r requirements.txt (line 2))
  Downloading https://wheels.galaxyproject.org/packages/bx_python-0.7.3-cp27-cp27mu-manylinux1_x86_64.whl (2.1MB)

    <wheels download="" -="" shortened="">

  Using cached PasteScript-2.0.2-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pyparsing>=2.0.1 in /root/anaconda2/lib/python2.7/site-packages (from svgwrite==1.1.6->-r requirements.txt (line 57))
Installing collected packages: bx-python, SQLAlchemy, mercurial, numpy, six, Paste, PasteDeploy, wchartype, repoze.lru, Routes, WebOb, WebHelpers, Mako, pytz, Babel, Beaker, dictobj, Markdown, Cheetah, requests, requests-toolbelt, boto, bioblend, amqp, anyjson, kombu, psutil, PasteScript, pulsar-galaxy-lib, decorator, Tempita, sqlparse, pbr, sqlalchemy-migrate, Parsley, svgwrite, ecdsa, paramiko, Fabric, Whoosh, pysam
  Found existing installation: SQLAlchemy 1.0.13
    DEPRECATION: Uninstalling a distutils installed project (SQLAlchemy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling SQLAlchemy-1.0.13:
      Successfully uninstalled SQLAlchemy-1.0.13
  Found existing installation: numpy 1.11.1
    Uninstalling numpy-1.11.1:
      Successfully uninstalled numpy-1.11.1
  Found existing installation: six 1.10.0
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.10.0:
      Successfully uninstalled six-1.10.0
  Found existing installation: pytz 2016.4
    DEPRECATION: Uninstalling a distutils installed project (pytz) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling pytz-2016.4:
      Successfully uninstalled pytz-2016.4
  Found existing installation: Babel 2.3.3
    Uninstalling Babel-2.3.3:
      Successfully uninstalled Babel-2.3.3
  Found existing installation: requests 2.10.0
    Uninstalling requests-2.10.0:
      Successfully uninstalled requests-2.10.0
  Found existing installation: boto 2.40.0
    DEPRECATION: Uninstalling a distutils installed project (boto) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling boto-2.40.0:
      Successfully uninstalled boto-2.40.0
  Found existing installation: psutil 4.3.0
    DEPRECATION: Uninstalling a distutils installed project (psutil) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling psutil-4.3.0:
      Successfully uninstalled psutil-4.3.0
  Found existing installation: decorator 4.0.10
    Uninstalling decorator-4.0.10:
      Successfully uninstalled decorator-4.0.10
Successfully installed Babel-2.0 Beaker-1.7.0 Cheetah-2.4.4 Fabric-1.10.2 Mako-1.0.2 Markdown-2.6.3 Parsley-1.3 Paste-2.0.2 PasteDeploy-1.5.2 PasteScript-2.0.2 Routes-2.2 SQLAlchemy-1.0.8 Tempita-0.5.3.dev0 WebHelpers-1.3 WebOb-1.4.1 Whoosh-2.4.1+gx1 amqp-1.4.8 anyjson-0.3.3 bioblend-0.7.0 boto-2.38.0 bx-python-0.7.3 decorator-4.0.2 dictobj-0.3.1 ecdsa-0.13 kombu-3.0.30 mercurial-3.7.3 numpy-1.9.2 paramiko-1.15.2 pbr-1.8.0 psutil-4.1.0 pulsar-galaxy-lib-0.7.0.dev5 pysam-0.8.4+gx1 pytz-2015.4 repoze.lru-0.6 requests-2.8.1 requests-toolbelt-0.4.0 six-1.9.0 sqlalchemy-migrate-0.10.0 sqlparse-0.1.16 svgwrite-1.1.6 wchartype-0.1
Activating virtualenv at .venv
ERROR: Your Python version is: 2.6
software error python anaconda • 1.3k views
ADD COMMENTlink modified 2.4 years ago by Remi Marenco80 • written 2.4 years ago by blewettn10
1
gravatar for Remi Marenco
2.4 years ago by
Remi Marenco80
Washington DC
Remi Marenco80 wrote:

Hi blewettn,

What do you mean by

Can I just modify a component of the run.sh script

?

For lisibility, can you edit your post by wrapping the logs with the code markup? (It should be the 101010 button on top of the text area)

About your question, I think I have run into these issues too:

Can you check your python version, first? python --version

An advice:

  • Don't run anything directly as root, but use instead sudo command, with your regular user. It will prevent you a lot of troubles (maybe really bad)
ADD COMMENTlink written 2.4 years ago by Remi Marenco80
1
gravatar for Remi Marenco
2.4 years ago by
Remi Marenco80
Washington DC
Remi Marenco80 wrote:

So, by looking at your logs, you seem to have Conda (with Anaconda). This guy is replacing your python path to its, and Galaxy is not using this one (I am not sure yet why).

To verify that can you run these two commands:

  • /usr/bin/python --version => It will give you the version Galaxy is using, hopefully 2.6 (not 100% sure though)
  • which python => It should give you the path to your python 2.7 and...through Anaconda folder ;)

Let me know if that is how you're setup is. If so, you have multiple solutions to find a way to tell Galaxy to use a Python 2.7.

For example, the use of a local_env.sh file => https://github.com/galaxyproject/galaxy/blob/dev/run.sh#L7-L10

Let me know how it goes!

Remi

ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by Remi Marenco80
1
gravatar for Remi Marenco
2.4 years ago by
Remi Marenco80
Washington DC
Remi Marenco80 wrote:

Hi bleweth,

So we can see Galaxy is trying to get the python from /usr/bin/python and this is a 2.6 one.

What you can do, is to load into $PYTHONPATH you Anaconda Python.

To do that, create a file called local_env.sh in the config folder of your Galaxy and put this line inside:

PYTHONPATH="/root/anaconda2/bin/python"

Then launch Galaxy with sh run.sh and enjoy.

PS: Don't forget that if you uninstall Anaconda, then you won't have access to this python anymore

Let me know how it goes :)

ADD COMMENTlink written 2.4 years ago by Remi Marenco80
0
gravatar for blewettn
2.4 years ago by
blewettn10
blewettn10 wrote:

It reports python 2.7.6

Very interesting regarding running as root, I've been doing this... Thanks for the interesting suggestion.

ADD COMMENTlink written 2.4 years ago by blewettn10
0
gravatar for blewettn
2.4 years ago by
blewettn10
blewettn10 wrote:

what I meant by "Can I just modify a component of the run.sh script" is that the script for running galaxy seems to check python version twice, once early, which passes, and once later, which fails and returns python 2.6.

So I'm just wondering if there's any way to either: force galaxy to look at python 2.7 during initial execution, or remove one of the python version checks. I'm new to all of this, and likely talk about things in an incorrect way.

ADD COMMENTlink written 2.4 years ago by blewettn10
0
gravatar for blewettn
2.4 years ago by
blewettn10
blewettn10 wrote:

[root@hdlxnextseq01955786 galaxy]# /usr/bin/python --version Python 2.6.6 [root@hdlxnextseq01955786 galaxy]# python -V Python 2.7.12 :: Anaconda 4.1.1 (64-bit) [root@hdlxnextseq01955786 galaxy]# which python /root/anaconda2/bin/python

I'll look into the file you suggest, thanks.

ADD COMMENTlink written 2.4 years ago by blewettn10
0
gravatar for blewettn
2.4 years ago by
blewettn10
blewettn10 wrote:

I ran galaxy in a Ubuntu 14 virtual environment, it runs through the script perfectly and allows server connection without error. The only reason I'm running centOS6 is because of the Illumina BCL2FASTq conversion program and Illumina suggestion. I can't find any rational reason to run centOS6. I will install Ubuntu 14 on our workstation. If necessary, I'll run BCL2FASTq through a centOS6 virtual environment, that makes much more sense. Lesson learned.

ADD COMMENTlink written 2.4 years ago by blewettn10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 182 users visited in the last hour