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

Drop support for Python 2.6 #1596

Closed
natefoo opened this issue Jan 27, 2016 · 22 comments
Closed

Drop support for Python 2.6 #1596

natefoo opened this issue Jan 27, 2016 · 22 comments

Comments

@natefoo
Copy link
Member

natefoo commented Jan 27, 2016

Python 2.6's EOL was with the 2.6.9 release in October 2013. The primary reason why we have continued to support Python 2.6 is that RHEL (and derivatives) 6 is still in wide deployment, and RHEL 6's Python is 2.6. I am not sure when the right time to drop 2.6 support will be, but wanted to make sure we had an issue to allow for discussion and cross referencing.

Many tools already require Python 2.7, to the extent that even though usegalaxy.org runs CentOS 6, we have compiled and use Python 2.7 to run tools. Although this is ultimately a tool dependency issue (for example, some IUC tools depend on an IUC Python 2.7 package) and need not necessarily guide the decision for the framework.

@nsoranzo
Copy link
Member

For Centos 6 you can easily install Python 2.7 using software collections with:

$ sudo yum install centos-release-SCL
$ sudo yum install python27

Then the software collection needs to be enabled with:

. /opt/rh/python27/enable

@natefoo
Copy link
Member Author

natefoo commented Jan 27, 2016

Could be a problem at sites where this is not allowed, although I'd like to hear people at such sites chime in.

@dannon
Copy link
Member

dannon commented Feb 18, 2016

Just to add this, pip's now spouting:

DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6

@dannon
Copy link
Member

dannon commented Feb 18, 2016

So, +1

@hrhotz
Copy link
Contributor

hrhotz commented Feb 19, 2016

Currently, we are still using Python 2.6 to run Galaxy. Since we are about to change 'everything' within the next few months, we will also jump to Python 2.7.

@pjbriggs
Copy link

My experiences: our first production Galaxy instance used Python 2.6 (which was the default on Scientific Linux 6.whatever) - I never had trouble with the core Galaxy platform but I remember a couple of tool installations from the TS implicitly expected Python 2.7 (e.g. using 2.7-only modules) and this caused me a few headaches at the time.

Since then I've always installed Python 2.7 and use this for Galaxy if it's not otherwise available. Building 2.7.11 from source seems to install to /usr/local by default.

@peterjc
Copy link
Contributor

peterjc commented Feb 19, 2016

We are still using Python 2.6 and CentOS 6 in order to match our cluster. We don't yet have a date for moving that to CentOS 7.

@natefoo
Copy link
Member Author

natefoo commented Feb 19, 2016

@peterjc is installing Python 2.7 on your CentOS 6 systems an option for you?

@bgruening
Copy link
Member

Python2.7 on SL6.6 here, so we are fine and could share our Python build scripts and setup if needed.

@peterjc
Copy link
Contributor

peterjc commented Feb 19, 2016

We can look into using Python 2.7 rather than Python 2.6 under CentOS 6, but would have to roll this out for the Galaxy server and the entire cluster. I don't know if our SysAdmins would prefer doing this via the software collection package repository, or perhaps just having a Python 2.7 compiled from source...

@cjfields
Copy link

@peterjc we installed python 2.7 specifically for our local Galaxy instance and have been running it off our NFS, which seemed to work fine.

@jmchilton
Copy link
Member

galaxy-dev informed this is on horizon - http://dev.list.galaxyproject.org/Python-2-6-Support-td4668888.html

jmchilton added a commit to jmchilton/galaxy that referenced this issue Feb 22, 2016
jmchilton added a commit to jmchilton/galaxy that referenced this issue Feb 22, 2016
@jmchilton
Copy link
Member

I would sort of like to retain Python 2.6 support in the subset of Galaxy that is galaxy-lib for now... I think... for Pulsar. Maybe not though, time to just let go huh?

@mr-c
Copy link
Contributor

mr-c commented Feb 23, 2016

👍 for letting go

@peterjc
Copy link
Contributor

peterjc commented Mar 7, 2016

According to @dannon svgwrite is the first causality of dropping Python 2.6 support (#1882).

Galaxy needs to have an explicit early abort when run with older unsupported versions of Python to save people pain of this kind of cryptic failure....

i.e. Update https://github.com/galaxyproject/galaxy/blob/dev/scripts/check_python.py which still says Python 2.6 is supported.

@dannon
Copy link
Member

dannon commented Mar 7, 2016

@peterjc Nice catch. I'm closing that other issue and will update check_python to assert 2.7+.

@dannon
Copy link
Member

dannon commented Mar 7, 2016

(and this one, I guess)

@jonathanjacobs
Copy link

Seems like something is not quite right still though. We are installing latest GALAXY on CentOS 6.5 system. routinely using python2.7 along side python2.6 and have aliased python, pip, etc all to 2.7 version - but GALAXY install (clean, from scratch) still carps about 2.6 being installed and not support, install then fails.

[galaxy@pandora galaxy]$ ./run.sh
[cut blah blah blah...]
Requirement already satisfied (use --upgrade to upgrade): ordereddict==1.1 in ./.venv/lib/python2.6/site-packages (from -r /dev/stdin (line 2))
You are using pip version 8.0.2+gx2, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Unsetting $PYTHONPATH
Activating virtualenv at .venv
ERROR: Your Python version is: 2.6
Galaxy is currently supported on Python 2.7 only. To run Galaxy,
please download and install a supported version from python.org. If a
supported version is installed but is not your default, getgalaxy.org
contains instructions on how to force Galaxy to use a different version.
[galaxy@pandora galaxy]$ python --version
Python 2.7.8
[galaxy@pandora galaxy]$ pip --version
pip 8.1.1 from /usr/local/lib/python2.7/site-packages (python 2.7)
[galaxy@pandora galaxy]$ which python2.7
/usr/local/bin/python2.7
[galaxy@pandora galaxy]$ which python
alias python='/usr/local/bin/python2.7'
/usr/local/bin/python2.7

scratching my head here a bit...

@nsoranzo
Copy link
Member

@jonathanjacobs It seems that the python installed in your virtualenv .venv is at 2.6. You can try to remove the virtualenv and start Galaxy again:

$ mv .venv .venv26
$ ./run.sh

If this works, you can remove the .venv26 directory.

@jonathanjacobs
Copy link

Nope. No dice.

I removed galaxy all together to start fresh, and re cloned from github. Now, oddly enough - when I run ./run.sh it skips the install steps and immediately reports the python version mismatch. (which isn't correct).

[galaxy@pandora galaxy]$ ./run.sh
ERROR: Your Python version is: 2.6
Galaxy is currently supported on Python 2.7 only. To run Galaxy,
please download and install a supported version from python.org. If a
supported version is installed but is not your default, getgalaxy.org
contains instructions on how to force Galaxy to use a different version.
[galaxy@pandora galaxy]$ python --version
Python 2.7.8

And... I don't have a .venv directory in the first place... i'll keep hacking away at this...

@jonathanjacobs
Copy link

Now this... (bold text added for some clarity)

[galaxy@pandora galaxy]$ ./run.sh
Initializing config/migrated_tools_conf.xml from migrated_tools_conf.xml.sample
Initializing config/shed_tool_conf.xml from shed_tool_conf.xml.sample
Initializing config/shed_tool_data_table_conf.xml from shed_tool_data_table_conf.xml.sample
Initializing config/shed_data_manager_conf.xml from shed_data_manager_conf.xml.sample
Initializing tool-data/shared/ucsc/builds.txt from builds.txt.sample
Initializing tool-data/shared/ucsc/manual_builds.txt from manual_builds.txt.sample
Initializing tool-data/shared/ucsc/ucsc_build_sites.txt from ucsc_build_sites.txt.sample
Initializing tool-data/shared/igv/igv_build_sites.txt from igv_build_sites.txt.sample
Initializing tool-data/shared/rviewer/rviewer_build_sites.txt from rviewer_build_sites.txt.sample
Initializing static/welcome.html from welcome.html.sample
ERROR: Your Python version is: 2.6
Galaxy is currently supported on Python 2.7 only. To run Galaxy,
please download and install a supported version from python.org. If a
supported version is installed but is not your default, getgalaxy.org
contains instructions on how to force Galaxy to use a different version.
[galaxy@pandora galaxy]$ virtualenv .venv
New python executable in .venv/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
[galaxy@pandora galaxy]$ . .venv/bin/activate
(.venv)[galaxy@pandora galaxy]$ ./run.sh
Activating virtualenv at .venv
Downloading/unpacking https://wheels.galaxyproject.org/packages/pip-8.0.2+gx2.tar.gz
...... [cut].....
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
Installing pip script to /home/galaxy/galaxy/.venv/bin
Installing pip2.6 script to /home/galaxy/galaxy/.venv/bin
Installing pip2 script to /home/galaxy/galaxy/.venv/bin
...... [cut].....
You are using pip version 8.0.2-gx2, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Requirement already satisfied (use --upgrade to upgrade): importlib==1.0.3 in ./.venv/lib/python2.6/site-packages (from -r /dev/stdin (line 1))
Requirement already satisfied (use --upgrade to upgrade): ordereddict==1.1 in ./.venv/lib/python2.6/site-packages (from -r /dev/stdin (line 2))
You are using pip version 8.0.2-gx2, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Activating virtualenv at .venv
ERROR: Your Python version is: 2.6
Galaxy is currently supported on Python 2.7 only. To run Galaxy,
please download and install a supported version from python.org. If a
supported version is installed but is not your default, getgalaxy.org
contains instructions on how to force Galaxy to use a different version.
(.venv)[galaxy@pandora galaxy]$ python --version
Python 2.7.8
**(.venv)[galaxy@pandora galaxy]$ _pip --version
_pip 8.1.1
from /usr/local/lib/python2.7/site-packages (python 2.7)
(.venv)[galaxy@pandora galaxy]$ perl ~/bang_head_on_desk.pl

Any idea what's going on? It seems like the developers should simply hardcode python2.7 in the install scripts instead of just "python". I can't seem to figure out why this ./run.sh script is still calling python2.6 -- must be something to do with my bash environment? by where would I look? my PATH include python2.7 for all users...

@natefoo
Copy link
Member Author

natefoo commented May 11, 2016

@jonathanjacobs aliases are for interactive environments, they are not passed on to shell scripts. If you want to ensure that the first python found is python 2.7, set $PATH such that the directory containing Python 2.7 is before any directory containing Python 2.6.

Alternatively, you can create the virtualenv by hand first, as you did in your last comment. Are you certain that virtualenv as you ran it was virtualenv for the 2.7 Python? If not, you can always use virtualenv's -p option to explicitly specify the Python interpreter you want to use when creating the virtualenv.

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

No branches or pull requests