Discussion:
AOPython Question
(too old to reply)
Roastie
2009-05-28 18:43:00 UTC
Permalink
I installed the AOPython module:

% easy_install aopython

That left an aopython-1.0.3-py2.6.egg at
C:\mystuff\python\python_2.6.2\Lib\site-packages.
import aopython
All is well.

But I was uncomfortable, since I was used to seeing directories
of Python code for modules in site-packages, so I decided
to read about eggs:
http://mrtopf.de/blog/python_zope/a-small-introduction-to-python-eggs/

The article told me to run:
% easy_install aopython-1.0.3-py2.6.egg
The result was a long list of error messages and removal
of my egg, and Python could no longer use the AOPython module.

So, I'm looking for a better reference for telling me about eggs and
modules in site-packages.

Roastie
***@gmail.com
Mike Driscoll
2009-05-28 20:10:24 UTC
Permalink
   % easy_install aopython
That left an aopython-1.0.3-py2.6.egg at
C:\mystuff\python\python_2.6.2\Lib\site-packages.
import aopython
All is well.
But I was uncomfortable, since I was used to seeing directories
of Python code for modules in site-packages, so I decided
to read about eggs:http://mrtopf.de/blog/python_zope/a-small-introduction-to-python-eggs/
    % easy_install aopython-1.0.3-py2.6.egg
The result was a long list of error messages and removal
of my egg, and Python could no longer use the AOPython module.
So, I'm looking for a better reference for telling me about eggs and
modules in site-packages.
Roastie
The first way to do it is usually the preferred method. When you do

easy_install somePackage

the easy_install script will try to find the package on PyPI and
download the latest version. If you do the latter, you are telling
easy_install to look for that specific version. If you mis-spell the
version slightly, then you will probably have issues. I am guessing
that is why you received those error messages.

See the easy install official docs:

http://peak.telecommunity.com/DevCenter/EasyInstall

- Mike
Mike Driscoll
2009-05-28 20:12:36 UTC
Permalink
Post by Mike Driscoll
   % easy_install aopython
That left an aopython-1.0.3-py2.6.egg at
C:\mystuff\python\python_2.6.2\Lib\site-packages.
import aopython
All is well.
But I was uncomfortable, since I was used to seeing directories
of Python code for modules in site-packages, so I decided
to read about eggs:http://mrtopf.de/blog/python_zope/a-small-introduction-to-python-eggs/
    % easy_install aopython-1.0.3-py2.6.egg
The result was a long list of error messages and removal
of my egg, and Python could no longer use the AOPython module.
So, I'm looking for a better reference for telling me about eggs and
modules in site-packages.
Roastie
The first way to do it is usually the preferred method. When you do
easy_install somePackage
the easy_install script will try to find the package on PyPI and
download the latest version. If you do the latter, you are telling
easy_install to look for that specific version. If you mis-spell the
version slightly, then you will probably have issues. I am guessing
that is why you received those error messages.
http://peak.telecommunity.com/DevCenter/EasyInstall
- Mike
I forgot to mention, but I've found that using a virtualenv for
testing new modules is very helpful and you don't end up with lots of
junk entries in your system path. Check it out too: http://pypi.python.org/pypi/virtualenv

- Mike
David Bolen
2009-05-28 21:00:08 UTC
Permalink
Post by Roastie
% easy_install aopython
That left an aopython-1.0.3-py2.6.egg at
C:\mystuff\python\python_2.6.2\Lib\site-packages.
An egg is basically a ZIP file with a specific structure (you can
inspect it with common ZIP tools). Depending on the package
easy_install is installing, it may be considered safe to install as a
single file (which Python does support importing files from).

I tend to prefer to have an actual unpacked tree myself. If you use
the "-Z" option to easy_install, you can force it to always unpack any
eggs when installing them.

Alternatively, if you've already got the single egg, you can always
unzip it yourself. Just rename it temporarily and unzip it into a
directory named exactly the same as the single egg file was.

-- David
Diez B. Roggisch
2009-05-29 08:02:43 UTC
Permalink
Post by Roastie
% easy_install aopython
That left an aopython-1.0.3-py2.6.egg at
C:\mystuff\python\python_2.6.2\Lib\site-packages.
import aopython
All is well.
But I was uncomfortable, since I was used to seeing directories
of Python code for modules in site-packages, so I decided
http://mrtopf.de/blog/python_zope/a-small-introduction-to-python-eggs/
% easy_install aopython-1.0.3-py2.6.egg
Did you run that in the site-packages-directory? If yes, that was a
mistake. The above command is supposed to work on downloaded eggs that
lie around somewhere.
Post by Roastie
The result was a long list of error messages and removal
of my egg, and Python could no longer use the AOPython module.
So, I'm looking for a better reference for telling me about eggs and
modules in site-packages.
You did everything alright the first time.

Diez

Loading...