2

I am new at Django and I have made an app. Here is the link to the github repository: https://github.com/akashmalla07/spring. I followed this http://tutorial.djangogirls.org/en/deploy/ to deploy my code, and while running python manage.py migrate i am getting this error

ImportError: No module named 'django_nose' 

I did not get this problem while developing on my local machine, but I am getting this problem on PythonAnywhere. Please help me. Thanks in advance

edited after following your solution i got this error

  File "/tmp/pip-build-_l_qs3mn/wsgiref/setup.py", line 5, in <module>
    import ez_setup
  File "/tmp/pip-build-_l_qs3mn/wsgiref/ez_setup/__init__.py", line 170
    print "Setuptools version",version,"or greater has been installed."
                             ^
SyntaxError: Missing parentheses in call to 'print'

----------------------------------------
 Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-
 build-_l_qs3mn/wsgiref/

And i have referred to other stackoverflow solution i.e

  pip install --upgrade setuptools 

but didnot worked for me.

1 Answer 1

3

It looks like your project requires a number of extra modules -- in your requirements.txt you have this:

Django==1.8.3
django-nose==1.4.1
nose==1.3.7
requests==2.7.0
wsgiref==0.1.2

The tutorial you are following only has instructions on how to install the modules that their demo application requires, which is just Django. So you need to install your extra modules too.

To do this, in the Bash console where you installed django, you need to run this command:

pip install -r /home/yourpythonanywhereusername/spring/requirements.txt

Don't forget to replace yourpythonanywhereusername with your actual PythonAnywhere username.

Sign up to request clarification or add additional context in comments.

4 Comments

giles after following your solution i got error that i have mentioned in my edited post please refer that and please help me.
@Gilesi was getting error while installing wsgiref==0.1.2 and i mentioned my error in question(edited) and i searched and used pip install --upgrade setuptools but it didnot worked for me
It looks like your web app is dependent on using Python 2.7 instead of Python 3; the instructions you're following are for a Python 3 website. You need to delete the web app from the "Web" tab, then create a new one selecting the Python 2.7 option. You'll also need to delete your virtualenv and create a new one using Python 2.7.
These help pages are probably a better guide for setting up your app than the Django Girls tutorial. The tutorial is one of the best guides there is to creating your first Django website, but it's not a generic "how to deploy a Django application" guide -- it's very specific to the website they teach you how to build in the other sections of the tutorial.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.