Display Latest FreeBSD News At Prompt

In order to site-packages are made available to the PYTHON_DEFAULT_VERSION variable established is required running upgrade-site-packages target in lang/python as explained in /usr/ports/UPDATING (note 20110304):

If using portupgrade(1):
# cd /usr/ports/lang/python && make upgrade-site-packages

If using portmaster(8):
# cd /usr/ports/lang/python && make upgrade-site-packages -DUSE_PORTMASTER

After upgrade, you can import feedparser module without problems.
 
cpu82 said:
In order to site-packages are made available to the PYTHON_DEFAULT_VERSION variable established is required running upgrade-site-packages target in lang/python as explained in /usr/ports/UPDATING (note 20110304):

If using portupgrade(1):
# cd /usr/ports/lang/python && make upgrade-site-packages

If using portmaster(8):
# cd /usr/ports/lang/python && make upgrade-site-packages -DUSE_PORTMASTER

After upgrade, you can import feedparser module without problems.
Hi,

I need to record this into my leaning notes. I think as long as python version is the same as the one in `meta port`, one need not to explicitly specify PYTHON_DEFAULT_VERSION in /etc/make.conf but then what to do with python32 or python33 once they are installed later, will they overwrite /usr/local/bin/python

I appreciate all helps and hints and all of your valuable times to the forum and to me too.

With best regards,
MNIHKLOM
 
Well, as the porters-handbook says literally:
The Ports Collection supports parallel installation of multiple Python versions. Ports should make sure to use a correct python interpreter, according to the user-settable PYTHON_VERSION variable. Most prominently, this means replacing the path to python executable in scripts with the value of PYTHON_CMD variable.

Try to set PYTHON_VERSION variable to install textproc/py-feedparser as following:
# cd /usr/ports/textproc/py-feedparser && env PYTHON_VERSION=python2.7 make clean install

So add PYTHON_VERSION=python2.7 to /etc/make.conf to make setting permanent.
 
cpu82 said:
Well, as the porters-handbook says literally:


Try to set PYTHON_VERSION variable to install textproc/py-feedparser as following:
# cd /usr/ports/textproc/py-feedparser && env PYTHON_VERSION=python2.7 make clean install

So add PYTHON_VERSION=python2.7 to /etc/make.conf to make setting permanent.
Hi,

I do not touch porters-handbook before, only /usr/ports/UPDATING, /usr/src/UPDATING, /usr/doc/en_US.ISO8859-1/books/handbook/book.html but not often. This is rather new indeed.

I experimented by reinstalling python32 and found that /usr/local/bin/python is actually python 3.2, not the default one as specify in /etc/make.conf. The yield is that I have to force reinstalled meta-port for python in order for version 2.7 to be the default one.

I add python setting in /etc/make.conf already now.

All helps and hints and your times given to me through the forums are appreciated.

With best regards,
MNIHKLOM
 
MNIHKLOM said:
The yield is that I have to force reinstalled meta-port for python in order for version 2.7 to be the default one.

It's correct :e

Or doing dirty trick:
Code:
# mv /usr/local/bin/python python.old
# ln -s /usr/local/bin/python2.7 /usr/local/bin/python

Note that has to be redone after every update of the default python. So to recover the "old" symlink, undo the first step.
 
Back
Top