简体   繁体   中英

Linking Python Interpreter to PyDev Project in Eclipse

This is embarrassing but I can't remember (or find in the docs) how to link Python27 to a new project when checked out from Subclipse. As you can see below mccr has Python27 linked and is running just fine. However the version mccr2 I just checked out from SVN is missing the property "PyDev - Interpreter / Grammar".

包浏览器

I have never used subclipse, but I can tell mccr2 is not a "PyDev" project, it's missing that green "p" icon like mccr .

Try Rightclicking mccr2 > PyDev> Set as PyDev project

At minimum, the .project file in the root of your project is the Eclipse file that contains the project "natures". This is what determines the type of project and available tools. You can open this file in a text editor and edit it. So in your case, you could compare the one that works and one that does not and fix it by adding the nature. It sounds like the answer about right-click and Set as PyDev project would do same thing.

If you commit this file to your repository, then when you checkout the project it will be auto-configured.

Note that some types of projects will have additional files that are important to them. For example, Eclipse Java project also have the .classpath file and the .settings folder can contain a lot of different files with project-specific settings that can be worth versioning.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM