Sunday, October 10, 2010

Easy Install is a python module

Easy Install is a python module (easy_install) bundled with setuptools that lets you automatically download, build, install, and manage Python packages.

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

setuptools 0.6c11

Download, build, install, upgrade, and uninstall Python packages -- easily!

http://pypi.python.org/pypi/setuptools/


error when trying to install setuptools

sh setuptools-0.6c11-py2.6.egg
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/test-easy-install-4679.pth'
This error is because i did not use sudo before sh



The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

/usr/local/lib/python2.6/dist-packages/

Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

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

Please make the appropriate changes for your system and try again.


when using sudo
sudo sh setuptools-0.6c11-py2.6.egg

Processing setuptools-0.6c11-py2.6.egg
Copying setuptools-0.6c11-py2.6.egg to /usr/local/lib/python2.6/dist-packages
Adding setuptools 0.6c11 to easy-install.pth file
Installing easy_install script to /usr/local/bin
Installing easy_install-2.6 script to /usr/local/bin

Installed /usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.6.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11


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

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

easy_install SQLAlchemy
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

[Errno 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/test-easy-install-4798.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

/usr/local/lib/python2.6/dist-packages/

Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

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

Please make the appropriate changes for your system and try again.

with sudo

sudo easy_install SQLAlchemy
Searching for SQLAlchemy
Reading http://pypi.python.org/simple/SQLAlchemy/
Reading http://www.sqlalchemy.org
Best match: SQLAlchemy 0.6.4
Downloading http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.6.4.tar.gz#md5=f1e553e73ca989c162ea039b55bd93f5
Processing SQLAlchemy-0.6.4.tar.gz
Running SQLAlchemy-0.6.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-S4Xwlp/SQLAlchemy-0.6.4/egg-dist-tmp-FFZ3wR
no previously-included directories found matching 'doc/build/output'
zip_safe flag not set; analyzing archive contents...
sqlalchemy.dialects.mysql.base: module MAY be using inspect.stack
sqlalchemy.test.orm: module MAY be using inspect.getframeinfo
sqlalchemy.test.orm: module MAY be using inspect.stack
Adding SQLAlchemy 0.6.4 to easy-install.pth file

Installed /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6.4-py2.6.egg
Processing dependencies for SQLAlchemy
Finished processing dependencies for SQLAlchemy


>>> import sqlalchemy
>>> sqlalchemy._version_
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute '_version_'
>>> sqlalchemy_version_
Traceback (most recent call last):
File "", line 1, in
NameError: name 'sqlalchemy_version_' is not defined

this error is because there is two _ before and after versions __ not _


>>> sqlalchemy.__version__
'0.6.4'
>>>

Python eggs are a way of bundling additional information with a Python project, that allows the project's dependencies to be checked and satisfied at runtime, as well as allowing projects to provide plugins for other projects. There are several binary formats that embody eggs, but the most common is '.egg' zipfile format, because it's a convenient one for distributing projects. All of the formats support including package-specific data, project-wide metadata, C extensions, and Python code.
http://peak.telecommunity.com/DevCenter/PythonEggs

No comments:

Post a Comment