WebFaction
Community site: login faq

Hi All,

Apps -Django 1.3 and python 2.7

We are dealing with customer from different timezone and countries and so need to add this additional package. pytz-2011h-py2.7.egg django_countries-1.0.2-py2.7.egg I moved the requires eggs within ~/webapps/django/lib/python2.7 but did not work.

How should I go about installing these eggs

asked 28 Oct '11, 00:53

AKV
135
accept rate: 0%


Are you able to install it using the standard setup.py according to these instructions on installing python packages? You should also be able to extract the egg this way as well, but the key is using setup.py with the --install-* options to install the package into your web application's lib directory.

permanent link

answered 28 Oct '11, 01:08

ryans ♦♦
5.0k93460
accept rate: 43%

Thanks ,I have tried this command : PYTHONPATH=$HOME/webapps/django/lib/python2.7 easy_install-2.7 --install-dir=$HOME/webapps/django/lib/python2.7 --script-dir=$HOME/webapps/django/bin pytz-2011h-py2.7.egg and it throws the following error -

Best match: None
Traceback (most recent call last):
  File "/usr/local/bin/easy_install-2.7", line 8, in <module>
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install-2.7')()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1712, in main
    with_ei_usage(lambda:
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1700, in with_ei_usage
    return f()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1716, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 434, in easy_install
    self.local_index
  File "/usr/local/lib/python2.7/site-packages/setuptools/package_index.py", line 475, in fetch_distribution
    return dist.clone(location=self.download(dist.location, tmpdir))
AttributeError: 'NoneType' object has no attribute 'clone'
(28 Oct '11, 01:30) AKV

It's preferable to use setup.py:

APP_NAME='django'
PYVERSION='python2.7'

mkdir -p $HOME/src/pytz
cd $HOME/src/pytz
wget http://pypi.python.org/packages/source/p/pytz/pytz-2011k.tar.gz
tar -xzf pytz-2011k.tar.gz
cd pytz-2011k
PYTHONPATH=$HOME/webapps/$APP_NAME/lib/$PYVERSION $PYVERSION setup.py install --install-lib=$HOME/webapps/$APP_NAME/lib/$PYVERSION/ --install-scripts=$HOME/webapps/$APP_NAME/bin/
(28 Oct '11, 01:54) ryans ♦♦

Thanks that worked well. Trying to install django-countries on similar lines

(29 Oct '11, 05:57) AKV
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×337
×102

question asked: 28 Oct '11, 00:53

question was seen: 4,091 times

last updated: 29 Oct '11, 05:57

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM