Sunday 15 May 2011

python - Pycharm using base interpreter when configured to use virtualenv interpreter -



python - Pycharm using base interpreter when configured to use virtualenv interpreter -

i have configured pycharm (v3.4.1) on windows 7 machine utilize virtualenv, has django 1.7 1 of packages.

my base of operations interpreter @ c:\python27\python.exe , uses django 1.6.

i have configured pycharm utilize virtualenv django 1.7 using these steps: settings--> project interpreter--> [select virtualenv django 1.7] --> ok --> [wait pycharm re-index]

when django error page (debug on) shows up, says it's running django 1.6. also, when test django version in console, says it's running django 1.6.

what can forcefulness pycharm utilize packages within virtualenv?

here interpreter paths:

[virtualenv path]\lib [virtualenv path]\scripts c:\python27\lib c:\python27\dlls c:\python27\lib\lib-tk [virtualenv path] [virtualenv path]\lib\site-packages

this how configure pycharm:

[preferences] -> [django]: set django project root (this directory including app folder , virtualenv folder), location of settings.py , manage.py

[preferences] -> [project interpreter]: specify interpreter; if utilize virtualenv, python 3.4.2 virtualenv @ ~/path_to_your_project/your_project_name/your_virtualenv_name

[run] -> [edit configurations]: check if python interpreter set same set in step 2 , working directory configured app locates; also, should see environment variables has been set django_settings_module=your_app_name.settings

moreover, if doesn't work, might seek remove project in pycharm , recreate , set again.

hope helps.

python django virtualenv pycharm

No comments:

Post a Comment