# Cleaning out python2.6 paths/dependencies



## tokind (Jan 21, 2015)

I am trying to upgrade Python (having let my ports go stale) and I am stuck on one consistent problem: references to Python2.6. I have deinstalled and reinstalled all of Python, but do not get to the end because of various breaks. Right now I am stuck in 'py26-Jinja2-2.7.3 depends on package: py26-setuptools26>0 - not found'.

I tried adding py default version to /etc/make.conf:

```
WITH_PKGNG=yes
PYTHON_DEFAULT_VERSION='python2.7'
```
I am missing something and would be grateful for any suggestions.

```
# pkg info | grep python
python26-2.6.4                 An interpreted object-oriented programming language
python27-2.7.9                 Interpreted object-oriented programming language
python3-3_3                    The "meta-port" for version 3 of the Python interpreter
python34-3.4.2_1               Interpreted object-oriented programming language
```


----------



## chrbr (Jan 21, 2015)

There is an entry in /usr/ports/UPDATING related to devel/py-setuptools dated 20140307. Have you checked this already? Regarding Jinja, I see:

```
grep "^py27-Jinja2" /usr/ports/INDEX-10
py27-Jinja2-2.7.3|/usr/ports/devel/py-Jinja2|/usr/local|Fast and easy to use stand-alone template engine|/usr/ports/devel/py-Jinja2/pkg-descr|nivit@FreeBSD.org|devel python|gettext-runtime-0.19.3 indexinfo-0.2.2 libffi-3.2.1 libiconv-1.14_6 ncurses-5.9.20150110 py27-setuptools27-5.5.1_1 python27-2.7.9 readline-6.3.8|gettext-runtime-0.19.3 indexinfo-0.2.2 libffi-3.2.1 libiconv-1.14_6 ncurses-5.9.20150110 py27-Babel-1.3_2 py27-MarkupSafe-0.23 py27-pytz-2014.10,1 py27-setuptools27-5.5.1_1 python27-2.7.9 readline-6.3.8|http://jinja.pocoo.org/|||
py27-Jinja2-doc-2.7.3|/usr/ports/devel/py-Jinja2-doc|/usr/local|Documentation of Jinja2 template engine|/usr/ports/devel/py-Jinja2-doc/pkg-descr|nivit@FreeBSD.org|devel python|gettext-runtime-0.19.3 indexinfo-0.2.2 libffi-3.2.1 libiconv-1.14_6 ncurses-5.9.20150110 py27-Babel-1.3_2 py27-Jinja2-2.7.3 py27-MarkupSafe-0.23 py27-docutils-0.12 py27-pygments-2.0.1 py27-pytz-2014.10,1 py27-setuptools27-5.5.1_1 py27-sphinx-1.2.3 python27-2.7.9 readline-6.3.8|gettext-runtime-0.19.3 indexinfo-0.2.2 libffi-3.2.1 libiconv-1.14_6 ncurses-5.9.20150110 py27-MarkupSafe-0.23 py27-setuptools27-5.5.1_1 python27-2.7.9 readline-6.3.8|http://jinja.pocoo.org/docs/|||
```
Currently I have nothing which requires python26.


----------



## tokind (Jan 21, 2015)

I am on FreeBSD 8.4. There is not note on py-setuptools in the UPDATING for this collection.

```
grep "^py27-Jinja2" /usr/ports/INDEX-8
py27-Jinja2-2.7.3|/usr/ports/devel/py-Jinja2|/usr/local|Fast and easy to use stand-alone template engine|/usr/ports/devel/py-Jinja2/pkg-descr|nivit@FreeBSD.org|devel python|gettext-runtime-0.19.3 indexinfo-0.2.2 libffi-3.2.1 libiconv-1.14_6 ncurses-5.9.20150110 py27-setuptools27-5.5.1_1 python27-2.7.9 readline-6.3.8|gettext-runtime-0.19.3 indexinfo-0.2.2 libffi-3.2.1 libiconv-1.14_6 ncurses-5.9.20150110 py27-Babel-1.3_2 py27-MarkupSafe-0.23 py27-pytz-2014.10,1 py27-setuptools27-5.5.1_1 python27-2.7.9 readline-6.3.8|http://jinja.pocoo.org/|||
py27-Jinja2-doc-2.7.3|/usr/ports/devel/py-Jinja2-doc|/usr/local|Documentation of Jinja2 template engine|/usr/ports/devel/py-Jinja2-doc/pkg-descr|nivit@FreeBSD.org|devel python|gettext-runtime-0.19.3 indexinfo-0.2.2 libffi-3.2.1 libiconv-1.14_6 ncurses-5.9.20150110 py27-Babel-1.3_2 py27-Jinja2-2.7.3 py27-MarkupSafe-0.23 py27-docutils-0.12 py27-pygments-2.0.1 py27-pytz-2014.10,1 py27-setuptools27-5.5.1_1 py27-sphinx-1.2.3 python27-2.7.9 readline-6.3.8|gettext-runtime-0.19.3 indexinfo-0.2.2 libffi-3.2.1 libiconv-1.14_6 ncurses-5.9.20150110 py27-MarkupSafe-0.23 py27-setuptools27-5.5.1_1 python27-2.7.9 readline-6.3.8|http://jinja.pocoo.org/docs/|||
```

I still have a moving target (new break point as I work through them).

```
===>  Cleaning for p5-Chart-2.4.2
===>   p5-Chart-2.4.2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by p5-Chart-2.4.2 for building
===>  Extracting for p5-Chart-2.4.2
=> SHA256 Checksum OK for Chart-2.4.2.tar.gz.
===>  Patching for p5-Chart-2.4.2
===>   p5-Chart-2.4.2 depends on package: p5-GD>=2 - found
===>  Configuring for p5-Chart-2.4.2
===>  Building for p5-Chart-2.4.2
make: don't know how to make /usr/lib/perl/5.10/Config.pm. Stop
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop in /usr/ports/graphics/p5-chart.

===>>> make build failed for graphics/p5-chart
===>>> Aborting update
```
I `make deinstall` p5-Chart, `make reinstall` and success. There is no /usr/lib/perl/5.10/


----------



## chrbr (Jan 21, 2015)

Have you already replaced python2.6 by python 2.7? I am not sure about your post. Regarding setuptools I thought about

```
grep 20140307 /usr/ports/UPDATING -A 33
20140307:
  AFFECTS: users of devel/py-setuptools dependent ports
  AUTHOR: sunpoet@FreeBSD.org

  devel/py-setuptools is being used for every python ports (if USE_PYDISTUTILS
  defined) since r336553. Due to PKGORIGIN limitation, we cannot build one
  python port with python27 and the other with python33 since they require
  different setuptools versions which have same PKGORIGIN. With the addition
  of py-setuptools{27,32,33}, we could now have py27-foo and py33-bar coexist
  in one system.

  Note that this is only a short-term solution. It does not help if you need
  coexistence of one port with different python versions, e.g. py27-foo and
  py33-foo.

  Please rebuild all ports that depend on devel/py-setuptools and use
  devel/py-setuptools{27,32,33} instead.

  XX represents python version (27, 32 or 33) in the following steps.

  pkgng users:

  # pkg set -o devel/py-setuptools:devel/py-setuptoolsXX

  portmaster users:

  # portmaster -o devel/py-setuptoolsXX devel/py-setuptools
  # portmaster -r py\*setuptools

  portupgrade users:

  # portupgrade -o devel/py-setuptoolsXX -f devel/py-setuptools
  # portupgrade -fr devel/py-setuptools
```
As far as I know /usr/ports/UPDATING applies for all versions of FreeBSD because the ports collection is the same.


----------



## tokind (Jan 22, 2015)

Yes, I had updated to 2.7. I just searched UPDATES again and found the note you are referring to. Thanks. I am still stuck on p5-GD-Graph. I found an article that seems to have successfully reinstalled all of the p5- modules with a 'portmaster p5-' command. This just completed, so not I am going to try again to get Bugzilla running. Wish me luck.

Refs: http://serverfault.com/questions/40...my-existing-perl-5-14-to-perl-5-16-on-freebsd


----------

