I’ve been looking around for quite some time but I just can’t find the answer. Similar questions relate to some tricky cases with third party libraries and all, but my situation seems to be textbook-simple. Nevertheless I can’t figure out how this works.
I’m using Eclipse 3.5.2, Pydev 2.2.0, running on an Ubuntu 11.04 machine.
My case seems simple: I want to write a package as its own project, and then I want to write an application using this package in another project.
How should I setup pydev so that I can have this two projects “core” (the package) and “app” (which uses the core package), and from within “app” do:
import core
?
- I have added core to the Project References of app but it doesn’t do
anything. - I have added /core/ to the Source folders (I had to force for that because is was not
showing in the list), it didn’t work (so I removed it). - I have added /full/path/to/core to the External Libraries, it still doesn’t work.
By “doesn’t work”, I mean that I get an “unresolved import: core”, always.
Ideas?
Provided you have 2 projects with the PYTHONPATH properly set (through source folders), it should work just adding a project reference.
Maybe an example can help…
E.g.:
and then edit the project2 properties > project references and select ‘project1’ to be able to access the project1 from the project2.