pycharm doesn't "see" venv

I have a tiny project for flask.  The directory containing the project also contains a venv created with virtualenv.  This venv contains flask, installed with pip in this venv.

I create the code in the project starts with:

  from flask import Flask, request
  app = Flask(__name__)

The python interpreter for the project is:

  Python 2.7.6 virtualenv at ~/Dropbox/flaskprojects/venv

So that all looks good.  The code runs properly so the import finds the flask package.  All seems good.

There are two problems:

1. I cannot navigate to any of the code in the project.  Highlight Flask above and try Navigate/Declaration and pycharm says "cannot find declaration to go to".

2. In the project pane the External Libraries refers to my global python, not to the venv python.

There could be something wrong in my configuration.  Or there could be something wrong with pycharm's use of externally created venv's (this would seem to be a bug, if true).  Or, finally perhaps pycharm only works correctly with venv's it creates itself (if true, this seems undesirable and unnecessary).

Most likely, I have done something wrong.  What could it be?

Thanks
1 comment
Solved.  I had configured the python interpreter for the python console to be the venv.  I had to configure the project interpreter.

Lots 'o' settings in pycharm.
0

Please sign in to leave a comment.