Discover Flask, Part 17 - Virtualenvwrapper

preview_player
Показать описание
In this part we'll add the virtualenvwrapper tool to better manage our project's environment.

Links:

Рекомендации по теме
Комментарии
Автор

For anyone who wants this capability on the windows platform, there is virtualenvwrapper-env in the repos. You can install it with 'pip install virtualenvwrapper-win' and it works nicely.

darknawg
Автор

In this part we'll add the virtualenvwrapper tool to better manage our project's environment.

hermanmu
Автор

Thanks for the great guides!

Had some problems with this as a Windows user. Thought i'd share how I got it working.


set

to the end of the venv activate.bat file. Hope this helps

stevenjenkins
Автор

I think I had virtaualenv already installed as I have been using both Pyhton 2.7 and 3 for different tutorials, I got the same error as Keon Kim mentioned below and after running the export PATH command recommended in that SO thread and then doing a version check I get this:

david$ virtualenv --version
13.1.0
david$ sudo virtualenv venv
Password:
New python executable in venv/bin/python2.7
Also creating executable in venv/bin/python
Installing setuptools, pip, wheel...done.

so there are two versions of it now? Is this going to cause problems for me later?

DavidJones-lpwz
Автор

for windows - pip install virtualenvwrapper-win

lastedgeco
Автор

Hi Michael, great tutorial . I wonder how the system remember the even after rebooting mi notebook?

mtaquia
Автор

Ugh...i'm back to the issue with "KeyError: 'APP_SETTINGS'" again...what am i doing wrong???? I'm on ubuntu

Traceback (most recent call last):
  File "manage.py", line 5, in <module>
    from app import app, db
  File "/home/bryant/flask-intro/app.py", line 11, in <module>
   
  File "/home/bryant/.virtualenvs/discover-flask/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'APP_SETTINGS'

BryantRenaud