several version of eggs

Diez B. Roggisch deets at nospam.web.de
Tue Oct 7 11:14:54 EDT 2008


Sed wrote:

>> you need to easy_install with -m/--multi-version. All of your packages.
> Unfortunately, this is not even working :(

It is.

dir at client8049:/tmp$ virtualenv --no-site-packages test
New python executable in test/bin/python2.5
Installing setuptools............done.
dir at client8049:/tmp$ . test/bin/activate
(test)dir at client8049:/tmp$ easy_install-2.5 -m SQLAlchemy==0.4.4
Searching for SQLAlchemy==0.4.4
Reading http://pypi.python.org/simple/SQLAlchemy/
Reading http://www.sqlalchemy.org
Best match: SQLAlchemy 0.4.4
Downloading
http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.4.4.zip#md5=4b1d072f6493421088126e451bd8cb6e
Processing SQLAlchemy-0.4.4.zip
Running SQLAlchemy-0.4.4/setup.py -q
bdist_egg --dist-dir /tmp/easy_install-xhMYOI/SQLAlchemy-0.4.4/egg-dist-tmp-WTjxmH
zip_safe flag not set; analyzing archive contents...
sqlalchemy.databases.mysql: module MAY be using inspect.stack

Installed /tmp/test/lib/python2.5/site-packages/SQLAlchemy-0.4.4-py2.5.egg

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("SQLAlchemy")  # latest installed version
    pkg_resources.require("SQLAlchemy==0.4.4")  # this exact version
    pkg_resources.require("SQLAlchemy>=0.4.4")  # this version or higher

Processing dependencies for SQLAlchemy==0.4.4
Finished processing dependencies for SQLAlchemy==0.4.4
(test)dir at client8049:/tmp$ easy_install-2.5 -m SQLAlchemy==0.4.6
Searching for SQLAlchemy==0.4.6
Reading http://pypi.python.org/simple/SQLAlchemy/
Reading http://www.sqlalchemy.org
Best match: SQLAlchemy 0.4.6
Downloading
http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.4.6.tar.gz#md5=3d1e737bb408de25b2fadb19a736b40e
Processing SQLAlchemy-0.4.6.tar.gz
Running SQLAlchemy-0.4.6/setup.py -q
bdist_egg --dist-dir /tmp/easy_install-pJtAmh/SQLAlchemy-0.4.6/egg-dist-tmp-PW4OHw
zip_safe flag not set; analyzing archive contents...
sqlalchemy.databases.mysql: module MAY be using inspect.stack

Installed /tmp/test/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg

Because this distribution was installed --multi-version, before you can
import modules from this package in an application, you will need to
'import pkg_resources' and then use a 'require()' call similar to one of
these examples, in order to select the desired version:

    pkg_resources.require("SQLAlchemy")  # latest installed version
    pkg_resources.require("SQLAlchemy==0.4.6")  # this exact version
    pkg_resources.require("SQLAlchemy>=0.4.6")  # this version or higher

Processing dependencies for SQLAlchemy==0.4.6
Finished processing dependencies for SQLAlchemy==0.4.6
(test)dir at client8049:/tmp$ python2.5
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named sqlalchemy
>>> import pkg_resources
>>> pkg_resources.require("SQLAlchemy==0.4.4")
[SQLAlchemy 0.4.4
(/tmp/test/lib/python2.5/site-packages/SQLAlchemy-0.4.4-py2.5.egg)]
>>> import sqlalchemy
>>> sqlalchemy.__file__
'/tmp/test/lib/python2.5/site-packages/SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/__init__.pyc'
>>>   

Diez



More information about the Python-list mailing list