From owner-freebsd-ports@FreeBSD.ORG Sun Oct 6 10:45:32 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3EF51B60; Sun, 6 Oct 2013 10:45:32 +0000 (UTC) (envelope-from mva@FreeBSD.org) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.97]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EEBFC23B7; Sun, 6 Oct 2013 10:45:31 +0000 (UTC) Received: from [89.182.5.111] (helo=localhost) by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1VSloU-0007Z1-HJ; Sun, 06 Oct 2013 12:43:51 +0200 Date: Sun, 6 Oct 2013 12:43:49 +0200 From: Marcus von Appen To: Daamn M Subject: Re: Installing ports for different versions of Python Message-ID: <20131006104349.GA1367@medusa.sysfault.org> Mail-Followup-To: Daamn M , freebsd-python@freebsd.org, freebsd-ports@freebsd.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Df-Sender: MTEyNTc0Mg== Cc: freebsd-ports@freebsd.org, freebsd-python@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Marcus von Appen List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Oct 2013 10:45:32 -0000 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On, Sat Oct 05, 2013, Daamn M wrote: > Hi, > > Sorry if I'm asking a question that have been asked many times but I > couldn't find an answer using google. > > I need to install few version of Python (at least 2.6, 2.7 and 3.3). I > really appreciate that FreeBSD let me have many versions the same time. But > I have a problem when I need some third party library. It turns out that I > can have only one instance. > > For example: I have installed python 2.7 and then port py-someport. Then I > installed python 3.3 and set PYTHON_DEFAULT_VERSION to point python 3.3. If > I try to install port py-someport again I wll get an error message saying > that an older version is already installed. This is a limitation in package handling at the moment. The FreeBSD ports tree unfortunately uses the origin (e.g. devel/py-someport) to check, if a port was already installed, instead of e.g. the package name (e.g. py33-someport, py27-someport, etc.). This is something being out of scope of the FreeBSD python team, but we hope for a change of that behaviour in the near future. > The way a port is registered in the database suggest that there could be > more than one version. I mean: port py-someport is registered as > py27-someport when installed for python 2.7. > > Now I copy ports adding versio prefix. For example to install py-someport > for version 3.3 I copy the port as py33-someport. I works pretty well but I > don't find it a clean way. > > Could you help? Your best chance at the moment would be to use virtualenv, if possible. Most python packages feature pip support, so that you could 1) change to your specific virtualenv 2) pip install (or easy_install ) 3) work in your virtualenv Cheers Marcus --sm4nu43k4a2Rpi4c Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iEYEARECAAYFAlJRPuUACgkQi68/ErJnpkdoXACZAdbGsGCdokgBh7XgM/iC6Psp GFwAoL/MTigwflFJU2L/SqVDDAWUc0DM =Tclg -----END PGP SIGNATURE----- --sm4nu43k4a2Rpi4c--