python - Flask Extension not found in Virtual Environment after transfer to new computer -
i'll preface admitted may not totally understand inner-workings of virtual environments, please forgive me if i've committed utter fail.
for desktop (mac os x 10.7 + python 2.7) have virtual environment houses web application i'm building in python (using flask framework). wanted work on laptop, zipped directory contained virtual environment , code , transfered on laptop (mac os x 10.7 + python 2.7).
after unzipping, tried launch application , received following message:
(venv)****:*** ***$ python runserver.py traceback (most recent call last): file "runserver.py", line 2, in <module> weirdcanada import app file "/users/****/****/weirdcanada/weirdcanada/__init__.py", line 3, in <module> import weirdcanada.views file "/users/****/****/weirdcanada/weirdcanada/views.py", line 18, in <module> flaskext.principal import anonymousidentity importerror: no module named flaskext.principal
i tried pip install flask-principal
, after installing it, re-ran application , received same error. checked site-packages
in virtual environment , flask-principal
installed.
my questions:
- am misunderstanding point of virtual environments? should able copy virtual environment on have? thought consistency , portability main features.
- how can fix this?
thanks help!
i pretty sure changing line:
flaskext.principal
to
flask.ext.principal
should work.
i have 3 virtual environments installed on system(mac osx 10.6 + python2.7). created new virtualenv , code working fine in other virtualenv not working here , in case flaskext.wtf culprit.
i checked versions of flask , extensions in both virtualenvs , same version problem out of question.
it not make sense why should happen anyways try , reply back.
Comments
Post a Comment