Adding external dependencies to Django projects.

I don't have django or some of the libraries needed for my project installed in the sys.path. They are instead in a lib folder that i've put in my webroot. Is there a way I can tell PyCharm about these lib directories so I can use some of the debugging features of PyCharm?

Currently if I run the Django console I get ImportError: No module named django.core

I'm unable to edit the Environment Variables box in Run -> Edit Configs. It's stuck at PYTHONUNBUFFERED=1 -- I've also added my directories to Settings -> Python Interpreters but that still doesn't seem to give the expected results.

Thanks

3 comments

Hello jason,

You should be able to add the lib folder as a content root to your project

in Settings | Project Structure.

The problem with perceived inability to edit the environment variables is

fixed in recent EAP builds: http://blogs.jetbrains.com/pycharm/

I don't have django or some of the libraries needed for my project

installed in the sys.path. They are instead in a lib folder that i've

put in my webroot. Is there a way I can tell PyCharm about these lib

directories so I can use some of the debugging features of PyCharm?

Currently if I run the Django console I get ImportError: No module

named django.core

I'm unable to edit the Environment Variables box in Run -> Edit

Configs. It's stuck at PYTHONUNBUFFERED=1 -- I've also added my

directories to Settings -> Python Interpreters but that still doesn't

seem to give the expected results.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0

Alright. I downloaded PY-96.1203 and successfully edited the environment variables for the run settings.

I also added my lib/ folders to the Project Structure option pane (lib/django existing among other 3rd party libraries) but I'm still getting the error. I've attatched some screenshots to hopefully help out.

Thanks

Screen shot 2010-09-22 at 1.47.11 PM.png

Screen shot 2010-09-22 at 1.48.27 PM.png

Screen shot 2010-09-22 at 1.48.55 PM.png



Attachment(s):
Screen shot 2010-09-22 at 1.47.11 PM.png
Screen shot 2010-09-22 at 1.48.27 PM.png
Screen shot 2010-09-22 at 1.48.55 PM.png
0

I'm also unable to add any external libraries or anything installed with easy_install

I created this bug: http://youtrack.jetbrains.net/issue/PY-1946

It's only picking up standard py libs and nothing installed.

I've tried setting my interpreter paths, env vars, nothing.

0

Please sign in to leave a comment.