Reputation: 7212
While I'm SURE pytz
is installed in my virtualenv, as well as I'm SURE that my PyCharm's project is using the said virtualenv, the IDE is constantly complaining:
And when I check in the virtualenv:
(my-project-venv)anto@~/d/m/myproject$ pip freeze | grep pytz
pytz==2014.4
(my-project-venv)anto@~/d/m/myproject$ python -c "import pytz; print pytz"
<module 'pytz' from '/home/anto/.virtualenvs/my-project-venv/local/lib/python2.7/site-packages/pytz/__init__.pyc'>
What am I missing?
Upvotes: 2
Views: 3192
Reputation: 1
Go to top right gear icon drop down menu will be created and press settings.
Then use the search bar in the top left to type project.
Then find in the menu on the left python interpreter or project interpreter.
Click on it and press the plus near the word package.
type pytz in the search bar that appears.
Install
Upvotes: -1
Reputation: 1
Pytz was installed on shell, however the pycharm was unable to detect the same, after installing the module in pycharm with following options, it started working for me...
Upvotes: 0
Reputation: 21
I had the issue resolved by keeping my virtualenv outside my working project folder. Im not sure why it resolved the issue but it did miraculously.
Upvotes: 1
Reputation: 82470
This is probably because the virtualenv interpreter and interpreter that you've set for your pycharm project are not the same. Check your interpreter:
In my case, PyCharm was able to pick up that pytz is a module:
If the above failed, then try again after deleting the .idea
folder in your project directory.
Upvotes: 3