Imports from python eggs not found
Hi all,
I'm currently using Maia-94.585 on Mac OS X 10.6 with JDK 1.6.0_07 and version 2.5.3 of the Python plugin. I'm using the built-in 2.6 Python interpreter and I have multiple eggs installed in my site-packages directory. All of these eggs are under Global Libraries in a library for the Python interpreter but unfortunately, they don't seem to be found by Idea. However, libraries which have the eggs expanded work just fine.
I'm attaching a couple of screenshots to illustrate the problem.
Has anyone seen this issue? Thoughts or suggestions?
Thanks,
Meetesh
Attachment(s):
Screen shot 2010-03-24 at 11.30.34 AM.png
Screen shot 2010-03-24 at 11.30.56 AM.png
请先登录再写评论。
Hello Meetesh,
Please file a YouTrack issue at http://youtrack.jetbrains.net/
This is a limitation in the current version of the Python plugin that will
be removed in a future update.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
This has been 14 years…is it fixed yet?
I have 110 licenses. Been buying those for 4 years now. Perhaps I should simply just hop over to VSCode as it works fine. And is free.
Hello James Barwick
I am sorry for the negative experience.
Unfortunately, I could not find any relevant bugs except:
https://youtrack.jetbrains.com/issue/PY-34568/PyCharm-fails-to-resolve-modules-in-eggs-from-external-libraries-via-import-statemements-even-though-it-succeeds-to-resolve-them
Does it cover your case? If not, may I ask you to share a package example and steps to reproduce?
My base or root project folder is a “holding” location for many “Modules”. I have yet to put each module in a separate git repository.
base-root-project-folder (git master branch)
module-one (source root)
module_one
__init__.py
tests
module-two (source root)
module_two
__init__.py (import module_one)
tests
my_app.py (import module_two)
venv
Lib
I was trying to be very smart. In intelli “Project Structure”, I had my base-root as a “module” (the “project”), and it has a venv, and then I added each module (module-one, module-two, etc) as individual “modules”. Indeed, it might be possible that each module has its own venv
Then, within the this project's venv I said:
(venv) base-root-project-folder # pip install -e ./module_one
(venv) base-root-project-folder # pip install -e ./module_two
The code completion, linters, did NOT recognize the module_two “source” folder as a root folder or module_one.
I resolved the issue by deleting the “module” from project structure. “REMOVE” source folder attribute from ‘base-root-project-folder’ and applying/ensured that “base-root-project-folder” project had module-one and module-two folders marked as “source”. I then moved “my_app.py” into a “src” folder and marked it as “source root”.
Then all worked fine.
Yes yes I KNOW that if I moved the folders “module_one” and “module_two” under the base-root it would have worked. Don't tell me to do that. I WANT them in separate folders. Each has its own build and twine deployment.