Error: The selected wizard could not be started.
Plug-in org.python.pydev was unable to load class org.python.pydev.ui.wizards.project.PythonProjectWizard.
An error occurred while automatically activating bundle org.python.pydev (547).
This error occurs as a result of installing the wrong version of PyDev for the version of Eclipse that you're using (found a hint on SO here).
For example, I (Edit: used to) use Eclipse Luna (Service Release 2, v4.4.2). I tend to lose my plugins / settings every time I update Eclipse on a Mac, and I'm too lazy to look into why, so I've avoided updating. Which is how I ran into the problem you describe here.
The version of PyDev available in the Eclipse Marketplace is, as of this writing, 6.5.something. You'd think Eclipse would be smart enough not to allow incompatible plugins to be installed with the Marketplace installer, but nope.
Look here for an idea of which version of PyDev you need to work with your version of Eclipse (check the "About" box within Eclipse), then follow the instructions here to download the appropriate .zip from SourceForge, extract it, and move the extracted files into the dropins directory, preserving the hierarchy that existing inside the archive.
For Eclipse Luna (4.4), I found that PyDev 5.2.0 seems to work fine (so far).
Note that the location of the dropins folder may vary by operating system. Once upon a time, I bookmarked this reference (for Luna) from the Eclipse help, and it may be useful somehow.
Related
I've lost count on how many articles I've read both here on SO and elsewhere, but even after trying all suggestions I've had no success, so I decided to post my specific question here.
I'm on OSX (10.9), I have a Python 2.7 installation on a virtualenv (besides the global one) and Aptana Studio 3. I've tried all sorts of set ups, but I got to my current configuration by doing:
File > Import > General – Existing folder as new project
I then right-clicked the project directory and selected PyDev > Set as Django Project. I chose my manage.py and settings file.
Then I went on to Properties > PyDev – Interpreter/Grammar and clicked the hyperlink to configure an interpreter not listed. I selected the python file in my virtual environment. I was prompted with the following list of folders to choose:
If I click "apply" without changing the default, I get the following error:
If I proceed anyway, I get all sorts of import errors for standard library packages/modules (e.g. json). I went and checked the lib folder in my virtualenv python installation and indeed these packages/modules were not present, which makes me even more confused about how virtualenv works (I hate these configuration things and I admit that for a long time I have avoided them whenever I could, collaborating to the maintenance of my ignorance). I have virtualenvswrapper installed. workon env_name works perfectly, the pip installations go to the correct site-packages, but the standard library seems to be being accessed in the global python.
Anyway, I therefore included the global python lib folder:
I then went to Properties > PyDev – PYTHONPATH > Source folders tab > Add source folder, selected the root of my Django project and clicked Apply.
I went to Aptana Studio 3 > Settings… > PyDev > Code Analysis and configured it:
RESULT:
Certain things, like method( self ): (notice the spaces) are corrected on save. I don't get any PEP8 warnings for many other stuff though, like dict[ 'key' ] (extra spaces again), more than 80 characters per line etc.
I also get errors on relative imports (e.g. from ..utils import *) and consequently all lines that use the imported values.
What could I possibly be doing wrong??
Although I haven't completely solved my problem, I'm posting this as an answer because it does achieve what the title asks for.
I reinstalled Aptana and instead of importing an existing folder as project I created a Django project (New > Project > PyDev Django Project) and replaced the default new directory with my project's root. IT WORKED. I'm getting PEP8 warnings now!
There are caveats, however :
I don't know what this "create project" wizard does differently behind the scenes but as I feared it messed up with my files somehow. A git status showed almost everything deleted and a lot untracked files. I cleaned it up with a git checkout -- <project root> and git clean -f -d. That solved the problem and the PEP8 warnings are still showing.
The second problem is that relative imports are broken. I have a from ..utils import * for example. There are no error or warning on this line itself, but I get false "Undefined variable" erros in every line that uses something from this import.
According to this issue, it seems to be an open, unresolved problem with PyDev.
According to the PyDev relase history, however, Release 2.2 "Fixed issue with relative import with wildcards", which makes me very confused.
For the moment I guess I will simply hide "undefined variable" errors, since these will be caught when I actually run the code anyway. But the whole point of using an IDE is having features that catch these errors beforehand, so if anybody has some light to shed on this issue it would certainly be very appreciated.
PS: The scenario is exactly the same in LiClipse. PEP8 works now but relative imports lead to "Undefined variable" errors.
UPDATE
Here's a screenshot of the situation:
Well, the real problem is that Aptana Studio 3 has an older version of PyDev bundled (and you can't really update it separately). The virtualenv folders for the library are there, but unchecked by default in this version of PyDev (so, you can check them manually -- but in the latest PyDev this is already gotten properly).
Now, for pep8, it's a known issue that the current version of PyDev can't work with the latest pep8 (because it uses its internal Jython to run it, which is a bit old: Jython 2.2.1). This was just fixed -- it's still not in an official release, only in the current nightly build -- but should be in a final release next week (which updated the internal Jython, pep8 and added autopep8 as a code-formatting preference).
Still, if you're using Aptana Studio 3, I don't know when they're going to upgrade it to that version (I'm not sure what you use from Aptana Studio 3, but depending on your needs, LiClipse: http://brainwy.github.io/liclipse/ can be used as an alternative -- and it's always kept updated with the latest PyDev).
This isn't my first time using Eclipse or installing PyDev but this is the first time it both succeeded and failed.
It succeeded because it installed, it shows up as being installed and installation went on fine without a problem.
It failed because nothing has shown up, there is no Python perspective, no PyDev views in the view list, no new projects under PyDev, no PyDev preferences. It is as if it is not actually installed at all.
The only thing I did differently is extract the latest eclipse to a folder called ~/eclipse and create a short cut to run it there (the latest Eclipse), usually I use apt-get to install eclipse, realise it's an old version (C++11 stuff missing) then upgrade and do this. Somehow PyDev is usually carried forward.
I'm not sure how it can list it as being installed but have this error, I'd appreciate any help you guys can offer.
I bet it's the problem of 3.x version of PyDev. It demands java 7.
2 solutions are possible:
Install java 7. re-run the Eclipse, Pydev should function well now. OR
Install last 2.x version of PyDev.
To do it
1) Remove PyDev : In Eclipse About window click Installation Details
button below. You will see controls for removing plug-ins.
2) Install 2.x version of PyDev:
Eclipse Help->Install New Software.
REMOVE CHECKBOX "Show only the latest version" located at the bottom of the dialog.
Choose Pydev update site from the list and in the appeared list of PyDev versions choose latest in 2.x branch.
The problem is really that sometimes even installing java 7, Eclipse does not get it.
In http://pydev.org/download.html, there's a section called: PyDev does not appear after install!
Try to follow it to see if it fixes your problem (i.e.: making Eclipse find java 7).
Another option would be using PyDev standalone (i.e.: LiClipse). Although it's commercial, it should come with all the requisites builtin (so, no hassles to install) and is updated whenever PyDev itself is updated.
I'd like install pydev in eclipse by following method, all of them fails:
using update site, errors happens in the installation, looks like a firewall issue.
download the pydev zip file, and extract to the eclipse folder, not working ( could not find it in preference after restart eclipse)
download hte pydev zip file, and extract to the dropins folder, still not working (could not find it in preference after restart eclipse)
I am very frustrated on this, could anyone help on this ? Thanks
My enviroment:
OS: Mac 10.8
Eclipse: 3.7
Pydev: 3.0
Country: China
The easiest way is just getting the LiClipse standalone: http://brainwy.github.io/liclipse/ (which has PyDev and some other things -- such as a bundled JRE, egit, color theme, etc -- pre-configured).
Now, if you don't want to go that way, I think that since PyDev 3.0 was released, the most common issue is not having Java 7 installed (as from 3.0 onwards PyDev requires it and Eclipse is not good at telling you that this is a problem and just hides PyDev if you have an older VM).
I had same problem but I manually installed it and everything was solved.
I did this:
downloaded zip files containing pydev from HERE
unzipped features and plugins on respective directories on my eclipse installation directory
finally from eclipse : new Pydev project. right click on directory project -> properties -> on PYTHONPATH you should be able to configure your interpreter.
I had the same problem, I opened Eclipse as admin and it worked... don't know if it helps
Okay, here is the simple solution for you.
Open Eclipse and go to help>>Install new software and click on Add>> pyDev. and then update from Eclipse.
Here is a screen where I should point the Wing IDE to my python files. I am using IronPython.
Am I assuming correctly that textbox one gets filled with ipy.exe ? (proper path provided)
What should be in the rest of the boxes ?
I do not know about your question in particular; however few weeks ago, Michael Foord published a guide for using WingIde with IronPython.
You can find it here: http://www.voidspace.org.uk/ironpython/wing-how-to.shtml
Wing IDE at the moment doesn't allow the debug mode with IronPython. You need to link the IDE to the CPython install. (Michael Foord words in the article http://www.voidspace.org.uk/ironpython/wing-how-to.shtml]1).
Wing IDE wouldn't run the shell while pointing at Python 3.1. I am unsure whether that is something I have done wrong or that the incompabilities aren't sorted out yet.
I have installed CPython implementation from Python download site.Python download
I have set the Python executable path to the python.exe that gets installed to your Python Install directory.
I have modified the enviroment variables and added the Python directory to the PATH variable.
I setup PyDev with this path for the python interpreter
/System/Library/Frameworks/Python.framework/Versions/2.5/Python
since the one under /usr/bin were alias and Eclipse won't select it. I can run my python script now but cannot run the shell as an external tool. The message I get is
variable references empty selection ${resource_loc}
Same if I use {container_loc}
Any thoughts ?
Sunit
I installed the Python.org version as well, this is a must.
I finally got PyDev working in Eclipse by pointing the interpreter to:
/Library/Frameworks/Python.framework/Versions/2.6/bin/python
manually. If you don't do it manually (by using the Autoconfig) it seems to not find the right version.
Common practice seems to be to install an up-to-date Python 2.5 from python.org and use that instead of the system installation. I saw that recommended here and there when I got started on Mac OS X.
It installs under /Library (as opposed to /System/Library) so the system Python is intact. Pydev has /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python as its configured Python interpreter and all is well.
Can't state for sure that your trouble is due only to using the system's Python installation; in any case this way I have no trouble. Also, this way when you fiddle with your development environment (install things in site-packages, upgrade Python), anything that uses the system Python is sure to be unaffected.
I know this is a ancient post... but, in case of some newbee like me to get the better answer.
I just using "Eclipse Marketplace" from the "Help" menu and search for keyword "python" or "PyDev" to get PyDev, and get it successfully installed.
AND, you should add PyDev to the top-right dock.
For the instance, my eclipse on my laptop's OSX is (Version: Indigo Service Release 2 Build id: 20120216-1857).
Have fun, folks! :)
I believe ${resource_loc} or ${container_loc} (without any argument) are based on the current selection in your workbench when you are launching your script.
So are you selecting the right resource when selecting that script through the "external tool" runner ?
At least, click on the project name before you run one of the external programs.
Note: it works with a selection in the Navigator or Package Explorers views (the latest might not be available in PyDev environment though)