Error when configuring Python interpreter for PyDev in Eclipse - python

I just recently installed the PyDev 2.6 plugin for Eclipse (I run Eclipse SDK 4.2.1) and when I try to configure the Python interpreter to the path: > C:\Python27\python.exe , it gives me an "Error info on interpreter" and in error log it says:
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: unvalid Byte 2 of the sequence UTF-8 of 3 bytes
I have read other similar questions on this website about the same issue but the solutions do not suit my situation, as I don't have any unicode char in my path. I run Python 2.7.3. I would really appreciate any help or advice on how to solve this issue, as I would really love to start coding Python in Eclipse soon. Cheers.

I've faced same problem. The solution was reinstalling Aptana (or Eclipse, tested also on Kepler 4.2.x).
The source of problem was in path to your eclipse/aptana installition. I think that trouble here is determined by diacritic symbols in your name 'Andres Diaz', according to your username here))) (my case is: cyrillic username and user's home folder 'Михаил' in Windows8). Path to your python interpreter does not matter here.
The cure is: move/reinstall your Eclipse to folder with the path which does not contain any non-acsii character. In my case I've moved Aptana Studio from C:\Users\Михаил\Aptana3 to C:\Aptana3 and (maybe it's not necesarry, I don't know) its' workspace also to root C:\ folder.
P.S. I think it can be useful for those who also faced such problem cause I was not able to find any answer about how to solve this troubles but a lot of similar questions.
P.P.S. Sorry for my English, languages are not my leading skill)))

Related

Autopep8 and other modules not working after Windows 10 reinstall

I recently installed Windows 10 on my new PC and everything went fine until I encountered some issues with modules like autopep8. Researching the problem it didn't seem too many people have the same problem as me, so here goes my error code: SyntaxError: Non-UTF-8 code starting with '\xdf' (...).
I've never seen this before and I don't want to change the autopep8 installation files, but still would like to use it.
It seems like the problem was that my Windows username contained the letter 'ß' from the German alphabet. As some Python (and other) modules write the installation path at the beginning of the script it tried to transfer this special char but couldn't really translate it into the right UTF-8 code.
That way Windows thought that the file wasn't properly encoded in UTF-8 and therefore threw this error.
Solution: As you can't simply rename the Windows user account (tried it, failed miserably), you have to create a new one and work with that or reinstall Windows and select a proper name.
Lessons learned: when the Windows installer asks me what my name is, I won't give it my name again.

Intellij IDEA OSX Python Development Headaches

I recently started working at a Java shop where staff primarily use IntelliJ IDEA on Macs for development. I am in charge of writing automated tests for a data centric project, and my go-to language for this is Python. In the past, I have used PyCharm on Linux and Windows with great success, but configuring IntelliJ IDEA for Python on OSX has been confusing to me. So far, I have had no issues setting up a project and getting it to run Python scripts, but each time I try using the debugger, I get the following error:
/usr/bin/python: can't open file '/Users/{USER}/Library/Application Support/helpers/pydev/pydevd.py': [Errno 2] No such file or directory
So far, Googling around has turned up hardly anything useful - and most of JetBrains's help manuals are PyCharm focused, which is rather unhelpful in the IntelliJ context. Has anyone else come across something like this? I'm looking for insight into what exactly is going wrong here.
Try uninstalling and re-installing the plugin? There's definitely something wrong with the path above, it should have an IntelliJ<version number> between the Application Support/python and the helpers (at least by what's on my system). I am running IntelliJ 13 with the python plugin and have been able to debug without any problems with it.

Two Pythons: cannot import from within Sublime, works in Terminal

I don't know why after a year this suddenly became an issue, but I pip-installed requests and I got an import error when running from Sublime, but it worked fine in the terminal.
I dug a little and found that the terminal was running Python 2.7.3 from /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python (where requests worked) and Sublime was using 2.7.2 from /usr/bin/python. That's where my know-how ends, and this is an area I'm reluctant to fiddle with if I don't know what I'm doing. I'm using OSX 10.8.2. Any suggestions? Not even sure what to Google.
Since you are using a newer, non-system Python (which is a good idea), you need to tell Sublime Text 2 to use that Python. Although your shell $PATH was modified to include the location of the newer Python, Sublime Text doesn't know about that. See this answer for various ways to do that.
You need to start using virtualenv and virtualenvwrapper when developing. It gives you a sandboxed python environment for each of your projects.
I was led to this question/answer (by the above Ned Deily, no less) that solved everything. Hope it helps someone else! (Ned, would love to give you the karma, but at 26.7k it doesn't look like you're in dire need).
How to uninstall Python 2.7 on a Mac OS X 10.6.4?

Get error when coding Python in Eclipse

I was looking for an appropriate Python IDE for a long time. When googling and looking for a desired one in this forum and on the other websites I finally realised Eclipse is being suggested by the majority of the professional programmers. So as you would understand I downloaded Eclipse and the Pydev plugin for that purpose and started trying to configure and prepare Eclipse for usage and programming. As a beginner and a new one to Python, frankly I faced so many serious obstacles for installing and configuring the Eclipse and specifically for installing the Pydev plugin. After so much struggle, I finally succeeded in getting through with the configuration and installation but when I run the Eclipse and try to build a new project, when I introduce a new module and code, when I debug and run my code I get such error "
"Exception occurred executing command line.
Cannot run program "C:\Program Files\Python3\python.exe" (in directory "C:\EclipseWorkspace\csse120\Hello world"): CreateProcess error=3, The system cannot find the path specified"
I looked for Identical or similar issues in the forum and topics but the only suggestions were that this might be due to python 3.0(means I should be choosing Python 2.6 or 2.7 while choosing a new project), but this didn't solve my problem.
Would anybody please assist me: what should I be doing to solve this issue and problem. I be appreciating and thankful toward ant guidance and assistance.
I Thank you all in advance for your kind help
I haven't used eclipse in a while, but normally that error simply means that eclipse can't find the specified file in the specified path.
it might sounds stupid, I know, but are you sure you have C:\Program Files\Python3\python.exe in your system?

How should I setup the Wing IDE for use with IronPython

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.

Categories

Resources