Spyder keeps crashing in virtual python environment in OSX - python

I'm running an OSX Mountain Lion installation of Spyder (version 'spyder-2.2.0beta2.zip') inside a virtual environment setup using virtualenv and the Enthought academic build of Python. The setup loads up okay, but crashes whenever I am inside the 'save as' dialogue box, specifically as soon as I click on the 'Where:' dropdown box to select a folder. The terminal used to open Spyder then reports Segmentation fault: 11. Any ideas whats causing this?

(Spyder dev here) This is not our fault nor Enthought's one, but PySide's: the Python Qt bindings distributed by Enthought. Unfortunately they are not very stable (causing crashes like the one you described) and currently unmaintained, so we can't do anything about it.
Our recommended installation method on Mac is using our DMG (which uses PyQt4, a more stable set of bindings) and then switch your interpreter to the EPD's one. Or use MacPorts, if you feel brave enough :-)

Related

Is there an easy way to put my entire installation of PyCharm and WinPython on a USB stick?

I want to have a self-contained installation of python on a USB stick as I don't have enough room on my laptop to install anaconda etc.
This will also be useful as I use different machines that can't have software installed on them.
I know that multiple settings must be changed for this to work but there is very little information about this and I don't have any experience in changing program files/settings.
I already have both WinPython and PyCharm installed on the USB stick but I have not yet changed any settings.
I know this post is older, but I ran into this same question days ago.
I took a fresh USB stick and installed the latest Python onto it, instead of letting Python install to the default Windows directory. Then, I installed Pycharm the same way to my USB stick, with no issue.
Once I was inside of Pycharm, the bottom right hand corner of the screen said "No Interpreter." I clicked that and navigated my way to the flash drive and selected where Python was.
So far, I have had absolutely no issue using it and learning more about Python on the go!

Python icon not showing anymore

During the last days, I have realized that the python icon created in the Dock when launching ipython is no longer launching (see example here). This is problematic if I want to select any other application and then come back to my plot, since I can't click on the icon in the Dock (so I have to minimize a lot of windows until I reach it). I am using python 3.5 and running on OS X El Capitan.
I don't know when the issue appeared exactly, and it is hard to tell its origin since I recently updated XCode and the python packages through conda, but I was wondering if anyone has any idea of why this could be happening.
If you manage your installations with using Homebrew, you can run brew linkapps in your terminal to recreate symlinks to them.

No autocompletion with the ipdb prompt when using Spyder

I'm using Spyder for my python programming.
I'm having a problem when I use the debugfile (F7) command/function.
Once in the ipdb prompt I have no autocompletion and the up arrow action (for the history of commands) does not work.
When I'm using IPython on the terminal (I'm on MacOS) everything works fine.
I have installed Spyder, ipdb, and IPython using macport.
When I've tried installing with anaconda, the same problem occurs.
Do you have any idea of what's happening?
Thanks
(Spyder dev here) This is a limitation of the new, kernel-based architecture of IPython. We're planning to create a workaround over it and also significantly improve our debugging facilities next year, as can be seen in our Roadmap.

Eclipse - Installed PyDev and nothing changed

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.

Using pydev with Eclipse on OSX

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)

Categories

Resources