How do I import a pre-existing python project into Eclipse?

At time of writing none of the given answers worked.

This is how it's done:

  1. Locate the directory containing the Pydev project
  2. Delete the PyDev project files (important as Eclipse won't let you create a new project in the same location otherwise)
  3. In Eclipse, File->New->Pydev Project
  4. Name the project the same as your original project
  5. For project contents, browse to location containing Pydev project
  6. Select an interpreter
  7. Follow rest of the menu through

Other answers using Eclipse project importing result in Pydev loosing track of packages, turning them all into folders only.

This does loose any project settings previously set, please edit this answer if it can be avoided. Hopefully Pydev devs will add project import functionality some time.


In my case when i am trying to import my existing perforce project , it gives error no project found on windows machine. On linux i was able to import project nicely.

For Eclipse Kepler, i have done like below.

  1. Open eclipse in pydev perspective.
  2. Create a new pydev project in your eclipse workspace with the same name which project you want to import.
  3. By now in your eclipse workspace project dir , you must be having .project and .pydevproject files.
  4. Copy these two files and paste it to project dir which you want to import.
  5. Now close and delete the pydev project you created and delete it from local disk as well.
  6. Now you can use import utility to import project in eclipse.

New Project

Dont use default Location

Browse to existing project location ...

if its an existing eclipse project with project files that have correct paths for your system you can just open the .proj file ...

Tags:

Python

Eclipse