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

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -