'Using virtualenv in Pycharm as Django IDE

Please help me on this. I am doing this on Fedora 16.

My virtual environment is /home/username/Desktop/.pythonenv

Now, notice the dot. Because it is a hidden directory, I had to make a symbolic link in order to for Pycharm to "enter" the directory.

sudo ln -s /home/yeukhon/Desktop/.pythonenv /home/yeukhon/Desktop/sypythonenv

Now I can use this virtual environment. However, two problems occurred and I am not sure if first one has anything to do with the second one.

A. Missing GTK and GST

Here are the two screenshots. The virtualenv python is missing GTK and GST... I have no idea why.

System PythonVirtualenv

B. Django is not importable in this environment

I tried to Run my Django project under virtualenv (project1) but I can't. I can run the same project through Terminal.

[yeukhon@localhost ~]$ cd Desktop/djangoapp/project1
[yeukhon@localhost mysite]$ source /home/yeukhon/Desktop/.pythonenv/project1/bin/activate
(project1)[yeukhon@localhost mysite]$ python2.7 manage.py runserver
# I had to use python2.7 instead of python. That's the only problem with terminal here.

Question

  1. How do I make it runable in PyCharm with my virtualenv Python interpreter?

  2. Does #1 has anything to do with #2?

  3. How do I make GTK and GST appear in my virtualenv?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source