From owner-freebsd-python@FreeBSD.ORG Sat May 31 20:08:37 2014 Return-Path: Delivered-To: python@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 ESMTPS id 0B2BDD45; Sat, 31 May 2014 20:08:37 +0000 (UTC) Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.99]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0623628D1; Sat, 31 May 2014 20:08:36 +0000 (UTC) Received: from [89.182.124.148] (helo=localhost) by smtprelay05.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1WqpIV-00009U-LE; Sat, 31 May 2014 21:50:31 +0200 Date: Sat, 31 May 2014 21:50:31 +0200 From: Marcus von Appen To: Alfred Perlstein Subject: Re: Question on virtualenv (python) and FreeBSD Message-ID: <20140531195031.GA854@medusa.sysfault.org> Reply-To: Marcus von Appen Mail-Followup-To: Alfred Perlstein , python@freebsd.org References: <538A2A5F.2000601@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline In-Reply-To: <538A2A5F.2000601@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Df-Sender: MTEyNTc0Mg== Cc: python@freebsd.org X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2014 20:08:37 -0000 --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On, Sat May 31, 2014, Alfred Perlstein wrote: [...] > Specifically it seems like FreeBSD is shipping a relatively stripped > down version of Python that makes using virtualenv not work. Please be precise here. It does not work for your specific use case. > > ~/gitbridge/app % python db_repo/manage.py version_control sqlite:///db.db db_repo > > Traceback (most recent call last): > > File "db_repo/manage.py", line 5, in > > main(debug='False') > > File "/home/alfred/gitbridge/lib/python2.7/site-packages/migrate/versioning/shell.py", line 207, in main > > ret = command_func(**kwargs) > > File "", line 2, in version_control > > File "/home/alfred/gitbridge/lib/python2.7/site-packages/migrate/versioning/util/__init__.py", line 155, in with_engine > > engine = construct_engine(url, **kw) > > File "/home/alfred/gitbridge/lib/python2.7/site-packages/migrate/versioning/util/__init__.py", line 140, in construct_engine > > return create_engine(engine, **kwargs) > > File "/home/alfred/gitbridge/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 344, in create_engine > > return strategy.create(*args, **kwargs) > > File "/home/alfred/gitbridge/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 73, in create > > dbapi =dialect_cls.dbapi(**dbapi_args) > > File "/home/alfred/gitbridge/lib/python2.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 297, in dbapi > > raise e > > ImportError: No module named pysqlite2 > > > > I have details and a workaround on my blog here (less messy than pasting > the entire 200+ lines of info into this message): > http://splbio.wordpress.com/2014/04/19/using-djangosqlalchemy-and-virtualenv-on-freebsd/ > > Basically it seems that because we don't by default ship sqlite with > Python we wind up with this odd situation where the virtualenv'd Python > can't be used for the apps that I tend to use. > > I'm wondering can something be done to make virtualenv work better out > of the box for people? Shouldn't that be rephrased to "make virtualenv work better out of the box with my applications requiring package X?" Sorry for nit-picking here. We strip certain parts of a Python default installation, which others might or might not do. One could create a FAQ, what to watch or which additional packages are recommended for installation. Right now, I do not see a huge issue here, though. If this is a problem that someone sees as more critical for users, we should rethink the customized Python installation process, which however also means that users would have to install more dependencies, when they just want a simple Python interpreter. Cheers Marcus --5mCyUwZo2JvN/JJP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iEYEARECAAYFAlOKMoYACgkQi68/ErJnpkc8HQCfV/10p7/dyawMLGxq+dFavO9k X4AAoIPfEuplwaNUtB8s0DxPAPHS/VoM =n1Va -----END PGP SIGNATURE----- --5mCyUwZo2JvN/JJP--