WebFaction
Community site: login faq

I'm trying to install django-registration in my django app. First, I tried the method described in Webfaction docs:

PYTHONPATH=$HOME/webapps/myapp/lib/python2.7 easy_install-2.7 --install-dir=$HOME/webapps/myapp/lib/python2.7 --script-dir=$HOME/webapps/myapp/bin django-registration==2.3.0

It downloads the package, but I get this error:

error: Setup script exited with error in django-registration setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

I tried using pip:

pip install django-registration - t $HOME/webapps/myapp/lib/python2.7

And I get this error:

("Directory %r is not installable. File 'setup.py' not found.", '/home/bwareham/webapps/myapp/lib/python2.7')

I suspect an old version of pip is to blame, but when I try to upgrade I get this:

pip install -U pip
Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement pip in /home/bwareham/lib/python2.7/pip-1.1-py2.7.egg
No distributions at all found for pip in /home/bwareham/lib/python2.7/pip-1.1-py2.7.egg

asked 22 Dec '17, 15:18

bwareham's gravatar image

bwareham
32149
accept rate: 100%


You need to upgrade your Python 2.7 setuptools and pip:

mkdir -p ~/lib/python2.7
pip2.7 install -U setuptools --ignore-installed
pip2.7 install -U pip

Also, a caveat: in my testing of this, when I attempted to install django-registration, it pulled in all of the other dependencies, including Django 2.0. Django 2.0 doesn't support Python 2.7, so the install failed at that point.

My advice is that if you're starting a new Django project, you should be using Python 3.6. If you do, none of the above will be necessary.

permanent link

answered 22 Dec '17, 16:09

seanf's gravatar image

seanf
12.0k21635
accept rate: 37%

edited 22 Dec '17, 16:11

That did work, but I did run into a Django 2.0 problem. I didn't think it would be an issue because I already had Django 1.11 installed. However, it downloads 2.0, then hits this: AttributeError: 'module' object has no attribute 'lru_cache'

Unfortunately for me this was a final step on a project started in the fall before Django 2.0 was the stable version. But it looks like I can rebuild without too much trouble.

(22 Dec '17, 17:21) bwareham bwareham's gravatar image
1

However, it downloads 2.0, then hits this: AttributeError: 'module' object has no attribute 'lru_cache'

That's the Python 2.7 incompatibility making itself evident - but if you have Django 1.11 installed it shouldn't happen.

Feel free to open a support ticket if you'd like us to take a closer look.

(22 Dec '17, 17:27) seanf seanf's gravatar image
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:

×895
×52
×39
×16

question asked: 22 Dec '17, 15:18

question was seen: 2,972 times

last updated: 22 Dec '17, 17:27

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 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