Problem with 2 versions of python

Hello,
because FreeBSD 10 has lost his name-server bind (my bind97 was gone after an upgrade to FreeBSD 10) I decide to install bind10 (the latest now).

I have got the error:
Code:
bind10-1.2.0 You have python 2.7 set as the default, and this needs 3.3.[/quote]
I get python27, thats right  - so I install python33 beside python27, but I got the error again:
 [quote]bind10-1.2.0 You have python 2.7 set as the default, and this needs 3.3.[/quote]
Next I set this, as I reading here, in make.conf [code]DEFAULT_VERSIONS=python=3.3
And now I beginns do compile:
cd /usr/ports/dns/bind10
make build
but it recommends some other ports: boost-libs-1.55.0_1, botan110-1.10.7,..
in botan110-1.10.7 it stops!
cd /usr/ports/security/botan110
make build is OK, but
make install give this error:
===> Staging for botan110-1.10.7
===> botan110-1.10.7 depends on file: /usr/local/lib/libcrypto.so.8 - found
===> botan110-1.10.7 depends on shared library: gmp - found
===> Generating temporary packing list
gmake[2]: Entering directory `/usr/ports/security/botan110/work/Botan-1.10.7'
cp readme.txt build/docs
sphinx-build -b html doc build/docs/manual
Traceback (most recent call last):
File "/usr/local/bin/sphinx-build", line 5, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
gmake[2]: *** [docs] Fehler 1
gmake[2]: Leaving directory `/usr/ports/security/botan110/work/Botan-1.10.7'
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/security/botan110
*** Error code 1

Stop.
make: stopped in /usr/ports/security/botan110[/code]
in /usr/local/bin/sphinx-build the first line shows #!/usr/local/bin/python2.7.
so I believe there is problem with the 2 python versions. :q How can I fix that?
Because the depending ports from python27 are:
pkg info -r python27-2.7.6_4 python33-3.3.5_1
Code:
python27-2.7.6_4:        
        port-maintenance-tools-1.0_2
        ap22-mod_mono-2.10_1
        spamassassin-3.4.0_9
        gtk-update-icon-cache-2.24.22
        python2-2_2
        py27-pytz-2014.1.1,1
        py27-Babel-1.3_1
        py27-MarkupSafe-0.21
        py27-pygments-1.6_2
        py27-gdbm-2.7.6_2
        py27-docutils-0.11
        py27-libxml2-2.8.0_2
        pyzor-0.5.0_4
        py27-Jinja2-2.7.2_1
        net-snmp-5.7.2_9
        py27-sphinx-1.2.2
        llvm33-3.3_8
        glib-2.36.3_2
        gobject-introspection-1.36.0_2
        portell-0.2_1
        xcb-proto-1.10_1

python33-3.3.5_1:
        python3-3_1
        py33-sqlite3-3.3.5_3
        py33-setuptools33-2.0.1

So I believe when removing python27-2.7.6_4, I would get a lot of more trouble!

:q What can I do now to finished the bind10 installation?

:q Or how can I live with the 2 versions of Python in coexistence?

Thank you for your ideas to fix that.
Harald
 
This is clearly a bug in the new BIND 10 port. If it does need Python 3.3 then the port itself should set the required Python version in its Makefile and not use the system default. File a PR.
 
I have make (my first ;) problem report. But this do not fix the problem with the 2 Python versions.
 
The two versions is something you just have to live with and having them both installed doesn't cause any problems really. There's tons and tons of software that has been written for Python 2 that can not be easily migrated to Python 3, that's why you can't get rid of Python 2 just yet.
 
Hello,
Thank you for your answer. I have no experience with python, more with perl, php...
kpa said:
The two versions is something you just have to live with and having them both installed doesn't cause any problems really.
How can I do that?
And how do I fix the error with security/botan110?
Code:
ImportError: No module named pkg_resources
gmake[2]: *** [docs] Fehler 1
gmake[2]: Leaving directory `work/Botan-1.10.7'....*** Error code 2
This is my actual installation status: pkg info | grep py
Code:
py27-Babel-1.3_1               Collection of tools for internationalizing Python applications
py27-Jinja2-2.7.2_1            Fast and easy to use stand-alone template engine
py27-MarkupSafe-0.21           Implements a XML/HTML/XHTML Markup safe string for Python
py27-docutils-0.11             Python Documentation Utilities
py27-gdbm-2.7.6_2              Python bindings to the GNU dbm library
py27-libxml2-2.8.0_2           Python interface for XML parser library for GNOME
py27-pygments-1.6_2            Syntax highlighter written in Python
py27-pytz-2014.1.1,1           World Timezone Definitions for Python
py27-sphinx-1.2.2              Python documentation generator
py33-setuptools33-2.0.1        Python packages installer
py33-sqlite3-3.3.5_3           Standard Python binding to the SQLite3 library
python2-2_2                    The "meta-port" for version 2 of the Python interpreter
python27-2.7.6_4               Interpreted object-oriented programming language

python3-3_1                    The "meta-port" for version 3 of the Python interpreter
python33-3.3.5_1               Interpreted object-oriented programming language
 
yes, I had make 2 days before clean all ports and install them new:
Code:
rm /var/db/portsnap/tag
rm -rf /var/db/portsnap/files
rm -rf /usr/ports/*
cd /usr/ports
portsnap fetch
portsnap extract update
In between time I found this disscussion which describes my problem very good:
http://freebsd.1045724.n5.nabble.com/Dealing-with-2-7-and-3-3-installations-td5832223.html
But I don't know how I could solve that when I only use the ports without any tricks.
 
Hi,
I have get bind10 now compiled and installed. This is I have done:
I deinstalled lang/python33
I installed lang/python34 (the latest) and reinstall lang/python27
and
in dns/bind10 I give the command
make DEFAULT_VERSIONS=python=3.4
It breaks again at py-setuptools.
I go to devel/py-setuptools34 and do
make install DEFAULT_VERSIONS=python=3.4

in dns/bind10 again
make DEFAULT_VERSIONS=python=3.4
It breaks again for botan110-1.10.7
I install botan110-1.10.7 via the packages:
pkg install botan110-1.10.7

in dns/bind10 again
make DEFAULT_VERSIONS=python=3.4
...
error "/usr/local/bin/python3.4-config is not present..."
But there is a file: /usr/local/bin/python3.4m-config - I copy it
cp /usr/local/bin/python3.4m-config /usr/local/bin/python3.4-config

in dns/bind10 again
make DEFAULT_VERSIONS=python=3.4
==>OK!
make install DEFAULT_VERSIONS=python=3.4
==OK!

bind10 now installed, but it seems to me, that there is nothing integrated with the freeBSD concept. I mean I can not start it. Whether in /etc/rc.d or in /usr/local/etc/rc.d is any start script nor I can't find any *.conf files for bind10 in ../etc. It looks like there is a lot of new stuff for me to learn before I can configure it.

There is help in less /usr/local/share/doc/bind10/bind10-guide.txt

Thanks all for having try help me.
Harald
 
The rc(8) and the configuration files live under /usr/local/etc now. Starting with FreeBSD 10 BIND has been removed from base and the port versions of it install under the standard LOCALBASE which is /usr/local.
 
Thanks HL1234 your work make me easy to fix my problem, that I have had some days:
-------------------------------------------------------------------------------------------------------------------
Code:
20140503:
  AFFECTS: users of science/hdf5* and science/netcdf*
  AUTHOR: sunpoet@FreeBSD.org

  There are major version changes in HDF5 and NetCDF ports:
  - science/hdf5: updated from 1.6.9 to 1.8.12
...skipping...
  DEFAULT_VERSIONS=python=2.7 python2=2.7 python3=3.3
-------------------------------------------------------------------------------------------------------------------
I suggest that install python 3.4 and 2.7 and make as default " DEFAULT_VERSIONS=python=3.4" in " /etc/make.conf"
in order to eliminate conflits with "py-setuptools" installs python as follow:
Code:
cd /usr/ports/lang/python34/
make clean config install
cd /usr/ports/devel/py-setuptools34/
make clean config install
cd /usr/ports/lang/python27/
make clean config install
cd /usr/ports/devel/py-setuptools27/
make clean config install
Note: make deinstall and reinstall if needed
-------------------------------------------------------------------------------------------------------------------
pkg info -ix py
Code:
py27-setuptools27-2.0.1
py34-setuptools34-2.0.1
python27-2.7.6_4
python34-3.4.0
-----------------------------------------------
Code:
cd /usr/ports/security/botan110/
make clean config install
-----------------------------------------------
then " cd /usr/ports/dns/bind10/" and install
when an error:
Code:
configure: WARNING: /usr/local/bin/python3.4-config does not exist or is not executable ...
cp /usr/local/bin/python3.4dm-config /usr/local/bin/python3.4-config (my case) and install again
pkg info -ix bind
Code:
bind10-1.2.0
-----------------------------------------------
 
I also submitted a problem report for this. As I've hit this issue on top of all of the -- without exaggeration -- multitude of bugs, issues or annoyances I've encountered when upgrading to 10.0-RELEASE.

But it was fixable by using the make parameter specified above. Even after removing all of the python 2.7 packages and checking no reference to default versions in env or make.conf without the make parameter specified above the bind10 port would deploy python 2.7 itself, then complain that the wrong version of python was present!

You'd think this particular port would be QA tested since they have removed BIND from the base.
 
Why not use dns/bind98, dns/bind99, or dns/bind910? They are the successors of the BIND you used in base. I haven't had any issues there. BIND 10 is a fundamental re-write of BIND and is pretty much a whole different software package. Install any of the 9 series and you can use the configuration files and knowledge you already have.
 
Because I have had several problems with bind10, I decided to uninstall bind10 and install bind910 instead, bind910 has not problem with python27, python3 the "meta-port" or python34.
My system
Code:
# uname -a
FreeBSD mydomain 10.0-RELEASE-p3 FreeBSD 10.0-RELEASE-p3 #0: Tue May 13 18:31:10 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
My python files installed with no conflicts
Code:
py27-setuptools27-2.0.1        Python packages installer
py34-setuptools34-2.0.1        Python packages installer
py34-sqlite3-3.4.0_3           Standard Python binding to the SQLite3 library
python27-2.7.6_4               Interpreted object-oriented programming language
python3-3_1                    The "meta-port" for version 3 of the Python interpreter
python34-3.4.0                 Interpreted object-oriented programming language
bind installed
Code:
bind910-9.10.0.1_2             BIND DNS suite with updated DNSSEC and DNS64
 
Back
Top