python - Cannot import flask from project directory but works everywhere else -
so have run funny problem when trying use flask, can run ~/ (home) , not ~/projects/projectfolder. i'm using python 2.7.4 installed via homepage, virtualenv , virtualenvwrapper. every time it's same:
$ mkvirtualenv project new python executable in project/bin/python installing setuptools............done. installing pip...............done.
then install flask:
$ pip install flask [...] installed flask werkzeug jinja2 cleaning up...
then open python home directory:
(project) $ python >>> flask import flask >>>
then quit , go project folder:
(project) $ cd ~/projects/example (project) $ python >>> flask import flask traceback (most recent call last): file "<stdin>", line 1, in <module> file "flask.py", line 1, in <module> flask import flask importerror: cannot import name flask
and i'm bit lost why happening, have ideas?
according traceback, have module of own called flask.py
in ~/projects/example
.
the current directory searched before actual package installation path, shadows "real" flask.
Comments
Post a Comment