2
votes

I am new in web programming, so just starting with Python and Django. I am working on Windows 7 and already have Python 2.7 and Django 1.6.5 for a project I am working on.

For another project I need a virtual environment with Python 3.4 and Django 1.7 so I did:

  1. install Python 3.4 in another folder (c:\python34)
  2. create a folder for my new project (my_proj) and here executed:

    > c:\python34\python -m venv py34env

    > py34env/bin/activate

    > django-admin.py startproject --template='my proj github archive' env my_proj

    > cd my_proj

    > pip install -r requirements.txt

    > cd src

    > python manage.py migrate

The file requirements.txt contains among other packages Django 1.7

Now command manage.py migrate gives an error: it seems it doesn't find Django. If I do django --version I get no result, but if I do pip freeze it shows me Django 1.7.

Any help will be apreciated, Thanks a lot, Dani

1

1 Answers

0
votes

When working with Python on Windows, I always install virtualenvwrapper-win: https://github.com/davidmarble/virtualenvwrapper-win to get all the same convenience commands that you have on Linux or OS X.

You can create a virutalenv for Python 3.4, or any other Python runtime using the -p option (short for --python) and specifying the path to the Python executable:

mkvirtualenv my_env -p C:\python34\python.exe