I am using eclipse for python. How do I import an existing project into eclipse in the current workspace.
Thanks
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 ...
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.
.project' and
.pydevproject` files to the target project directory, just edit .project
file in something like vim
to swap in the appropriate project name into the <name>
tags; i.e. <name>PROJECT_NAME</name>
.
At time of writing none of the given answers worked.
This is how it's done:
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.
windows->preferences->Pydev->Interpreter-Python
then create new pydev project,
Copy these two files from some existing pydev eclipse project to root folder of new project which you want to import in eclipse. .project .pydevproject
Open .project file in notepad and change name to your_project_name. If you don't have these files then you can create them yourself.
Open eclipse, click File -> Import. New window will open. Now select 'Existing Projects into Workspace' under 'General' and click Next. On new window browse to project root directory and select root folder. Then click finish.
Check this tutorial for complete solution.
Following are the steps
thanks
First of all make sure that you have the same Python interpreter configured as the project has. You can change it under:
Window > Preferences > PyDev > Interpreters > Python Interpreters
As long the project was created using Eclipse you can use import functionality. Go to:
File > Import... > General > Existing Projects into Workspace
Choose Select root directory: and browse to your project location. Click Finish and you are done.
Create a new project with in Eclipse and copy the two files .project and .pydevproject to root directory from your Python project, then edit the .project file and replace the name project by the name of your python project.
Then go and import your python project👉👉
I just suffered through this problem for a few hours. My issue may have been different than yours...Pydev did not show up as an import option (as opposed to C projects). My solution is to drag and drop. Just create a new project (name it the same as your old) and then drop your old project into the new project folder as displayed in eclipse...3 hours later and it's drag and drop...
This can easily be done if you keep you project in a git repository. The following is working with Linux but should be ok with Windows as well:
Clone your project from the repository:
git clone https://url/of/project/file.git
(if you don't keep your project on a free git server like github or bitbucket, you can create a new local repository by changing directory into an existing project folder and typing git init
)
Then open eclipse and go to File > Import > Git > Projects from Git > Existing local repository > (select your project or add it) > Next > Finish
After following steps outlined by @Shan, if the folders under the root folder are not shown as packages,
It will add the root folder to the PYTHONPATH and now the folders will appear as packages