MyEclipse10 or eclipse Configuring the Pydev plugin installation tutorial for developing Python

Source: Internet
Author: User

Note Users who are using Liclipse

Pydev is already preinstalled in Liclipse, so you can skip this step (note that if you use Liclipse,pydev you cannot install or update separately because it must always be updated as a whole).

Necessities

Pydev requires Java 8 and Eclipse 4.6 (Neon) to run, and only Python 2.6is supported.

Without Java 8, the update process may succeed, but Pydev will not appear in the target installation. Before attempting to install Pydev, check carefully if you are using a Java 8 VM in Installation details > configuration .

Need to use the old Eclipse/java/python

If you need to use an older version of Eclipse/java/python, the following will use the latest Pydev version, depending on your requirements.

    • Eclipse 4.5,java 8:pydev 5.2.0
    • Eclipse 3.8,java 7:pydev 4.5.5
    • Eclipse 3.x,java 6:pydev 2.8.2
    • Python version 2.5 or older: PyDev 5.5.0
Before you start the installation

The first thing to choose before installing is a folder with permissions to write to (otherwise, remember to install Eclipse as an administrator and remember to run as an administrator whenever you need to update any plug-ins).

Pydev Certificate

Pydev is built with a self-signed certificate, which means that when a dialog box is installed, it will be opened to ask if you trust the certificate (most users should be able to use the certificate).

Now, if you don't want the dialog box to appear, you can import the certificate before you start the installation process (which is actually a requirement for those who want to install Pydev from the command line because there is an error in the Eclipse P2 Director).

The first step is to download the Pydev certificate.

The second step is to discover the Java used in eclipse: Go to Help > About > Installation details and look for "Java.home"

Then actually import it, on the command line, go to Eclipse's Java.home directory and execute

Bin/keytool.exe-import-file Pydev_certificate.cer-keystore Lib/security/cacerts

Please note that if you have never done anything here, your password requirements should be Changeit

Reference: http://download.oracle.com/javase/1.4.2/docs/tooldocs/solaris/keytool.html#cacerts

Installing using the Update site

Note: Instructions for Eclipse 4.6 or above

To install Pydev and Pydev Extensions using Eclipse Update Manager, you need to use Help > Install new software ... Menu.

In the next screen, add the update site that you want to use from the following list:

Latest Version:

    • Http://www.pydev.org/updates

Night-Time Construction:

    • http://www.pydev.org/nightly

Browse other versions (open in browser to select the URL of Eclipse):

    • Http://www.pydev.org/update_sites

and press <Enter>so that eclipse will query the update site for the content you just entered.

Before we start, we recommend that you uncheck the "Contact all update site during installation process to find the required software" (it can still work if you do not, but it will query all the update sites available, which is much slower than just querying the Pydev update site, This should be all the update sites required to install Pydev).

Now select PyDev for Eclipse to install PyDev (as well as optional PyDev Mylyn integration or developer resources, which provide PyDev source code), and then click Next.

Now, read the license agreement, if you accept, select the Accept radio button, and then click Finish .

At this point, eclipse should automatically download the plug-in content and provide a dialog box asking if you want to restart ( it should be said).

Installing using a ZIP file

The available locations for zip files are:

    • SourceForge download

After downloading the zip file:

Unzip the contents of the zip file in the eclipse/dropins folder and restart Eclipse.

If it does not work correctly, try restarting eclipse using the -clean flag (if you are an ordinary user and install with an administrator, make sure you dial -clean as admin and log in to make Eclipse discover it).

If you still can't find it, check the prerequisites (such as the Java VM version) carefully.

Check the installation

You can verify that it is properly installed into the Menu window preferences and check if there is a PyDev project.

Troubleshooting installation Issues Unable to load repository

Although most of the cases, as described below, some users may receive the following message:

Unable to load repository Http://pydev.org/updates

Unknown Host: http://pydev.org/updates/content.xml

This means that there is a problem accessing the update site in the current connection.

In this case, you can try to download using a direct URL (all Http://pydev.org/updates/URL are actually redirected to the final location). Currently, those redirects point to the link http://bintray.com, so you can access the relevant Update site page (such as http://pydev.org/updates in the browser) and see it being redirected (you might want to try using http or a direct link to HTTPS to see if it will affect your use case.

Problems that may occur while downloading

If you have any questions, please enter the following information:

An error occurred while collecting items to be installed
The repository is not found to contain:
org.python.pydev/osgi.bundle/1.4.7.2843
The repository is not found to contain:
org.python.pydev.ast/osgi.bundle/1.4.7.2843

This may indicate that the image you selected had some network problems at the time, so try again later (you might use a direct URL, such as the repository hint cannot be loaded above).

Pydev will not appear after installation!

So the main problem now is that Pydev needs Java 8 to run.

tip : Liclipse (which is mostly Pydev independent plus some good stuff) is preconfigured, so there's no need to install Pydev into eclipse or any prerequisites);

Java 8 Prerequisites

If you do not have Java 8, make sure that you download/install the latest Java 8 JRE or JDK, try restarting to see if it is automatically fetched.

That is: in Help > About > Installation details > Configuration Check whether you actually use the Java 8 version that you indicated.

If you do not get it automatically, follow these instructions:

Http://wiki.eclipse.org/Eclipse.ini Specify the Java 8 VM on the "Specify JVM" and add the-VM parameter to the Eclipse.ini.

considerations on Mac OS : You can use the command "/usr/libexec/java_home-v 1.8" to get the basic path of the JVM (although you also need to append "/Bin/java" to the output of the command-VM Arg in eclips E.ini).

Installation damage

Eclipse sometimes does not get the plug-in correctly from the update site, but does not check that it is correct (does not require a MD5 check), and when this happens, you typically receive classnotfoundexception (similar to the following example).

When this happens, you should uninstall it and reinstall the update site ... If it still fails, you can try to get the zip file because it will warn you at least when you are damaged.

Note that the likelihood of file corruption in the server is fairly low because this is what is always checked in the new version, but if you have questions, please report it on https://www.brainwy.com/. Tracker/PyDev so you can double check.

In addition, there are reports that this error, the only consistent solution has removed all previous versions of Pydev and then installed the latest version.

Cases

This section could not be created due to an internal error. Reason for failure: The editor class could not be instantiated. This usually indicates that the class name of the editor is incorrect in Plugin.xml.

Java.lang.ClassNotFoundException:org.python.pydev.editor.PyEdit
In
Org.eclipse.osgi.framework.internal.core.BundleLoader.findClass (bundleloader.java:405)
In
Org.eclipse.osgi.framework.internal.core.BundleLoader.findClass (bundleloader.java:350)
In
Org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass (abstractclassloader.java:78)
At the Java.lang.ClassLoader.loadClass (classloader.java:235) at
Org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass (bundleloader.java:275)
...
Unloading

If you want to stop using the Pydev plugin (or any other Eclipse plug-in) at any time, follow these instructions:

From Eclipse 3.5

If the update site is installed, go to menu Help > About > Installation details, and then on the installed Software tab, select the plug-in that you want to uninstall, and then click Uninstall .

If you have a zip file installed, simply remove the Com.python.pydev and Org.python.pydev features and plugins from the Dropins folder.

Source:Pydev Getting Started Guide

MyEclipse10 or eclipse Configuring the Pydev plugin installation tutorial for developing Python

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.