Pycharm sys.path handling for project packages

I'm a relatively recent convert to Pycharm, and I'm loving it so far. There is one particular gripe I have though:

There seems to be an issue (not with the latest Pycharm 2 Beta, but Pycharm in general) that if a particular module/package is both in site-packages and the current project, the site-packages version will take precedence. It seems that Pycharm simply appends project paths to sys.path, instead of prepending them.

This is quite annoying whenever one wants to work on a module that is also installed to site-packages at the same time. The only solution at the moment is to delete the offending package from site-packages. Does Pycharm have a setting for this? If not, would it be difficult to implement this?

5 comments
Comment actions Permalink

Hello Tom,

Right now this is not configurable. It should be; there is a feature request

for this somewhere in YouTrack already. :-)

I'm a relatively recent convert to Pycharm, and I'm loving it so far.

There is one particular gripe I have though:

There seems to be an issue (not with the latest Pycharm 2 Beta, but

Pycharm in general) that if a particular module/package is both in

site-packages and the current project, the site-packages version will

take precedence. It seems that Pycharm simply appends project paths to

sys.path, instead of prepending them.

This is quite annoying whenever one wants to work on a module that is

also installed to site-packages at the same time. The only solution at

the moment is to delete the offending package from site-packages. Does

Pycharm have a setting for this? If not, would it be difficult to

implement this?

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0
Comment actions Permalink

Hi Dmitry,

Thanks for the fast response!

I tried different search terms on youtrack but didn't find anything similar. Can I add a new item for this?

0
Comment actions Permalink

Hello Tom,

You sure can. :-)

Thanks for the fast response!

I tried different search terms on youtrack but didn't find anything

similar. Can I add a new item for this?

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0
Comment actions Permalink

Cool, for reference, I've created the folloing ticket: http://youtrack.jetbrains.net/issue/PY-5256

0
Comment actions Permalink

Is there an ETA perhaps on when this might be implemented? I was hoping that this change can maybe make it to 2.5 but I guess that's not going to happen anymore.

0

Please sign in to leave a comment.