-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3 Mac app can't start Python or IPython consoles #1957
Comments
From [email protected] on 2014-09-03T13:16:12Z My apologies for not following the appropriate format, as you may guess, this is my first bug report. |
From ccordoba12 on 2014-09-03T17:10:59Z Don't worry about it :) Summary: Tab completion fails in Console with Python 3.4 (was: Tab completion in Console with Python 3.4) |
From ccordoba12 on 2014-10-31T15:13:25Z Labels: -MS-v2.3.2 MS-v2.3.3 |
From ccordoba12 on 2015-01-08T15:31:37Z I can't reproduce this bug. Are you still seeing it? |
From ccordoba12 on 2015-01-10T11:21:51Z Labels: -MS-v2.3.3 MS-v2.3.4 |
From [email protected] on 2015-01-10T12:12:12Z Hm, that's a good idea, I opened this when Spyder didn't support Python 3 on OS X. I've also been trying to help you get it working on the mailing list. I'm not sure which is the best way for me to help you track down the issues. I just installed Sypder 2.3.2 with Python 2 to see if I can just point it to my Python 3 virtual environment. I got the following error report when OS X tells me that Python is crashing: Process: Python [20493] Date/Time: 2015-01-10 15:07:40.260 -0500 Sleep/Wake UUID: 1360B5BD-D857-46CA-870C-C65A2EB6BFD9 Time Awake Since Boot: 100000 seconds Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Application Specific Information: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread Thread 0 crashed with X86 Thread State (64-bit): Logical CPU: 0 Binary Images: |
From [email protected] on 2015-01-10T12:12:12Z ...1.3) /usr/lib/system/libsystem_trace.dylib External Modification Summary: VM Region Summary: REGION TYPE VIRTUAL =========== ======= =========== ======= Model: MacBookPro9,2, BootROM MBP91.00D3.B08, 2 processors, Intel Core i5, 2.5 GHz, 4 GB, SMC 2.2f44 |
@statmobile, I uploaded a new Python 3 dmg (for Spyder 2.3.3) to our downloads site: https://bitbucket.org/spyder-ide/spyderlib/downloads Would you mind to test it in your side to see if this one fixes the problems the previous one had? |
Hey Carlos, I just downloaded it and it still hangs saying "Connecting to kernel" in the IPython console. If you want, I can try to build the code from source on my machine again and see what happens. I had some notes on steps I needed to do in order to compile it on top of your notes. I'm currently running OS X 10.10.2 on my computer. |
Damn! I thought this time it was going to work :-( I'd really appreciate your help to build a workable Python 3 app, thanks!! Please keep me posted here or on issue #2089. I'll be more responsive this time (sorry for last time, I was really busy ;-) |
No need to apologize, I'm more than happy to help you now. I'll start working on building it tonight and keep you updated on this issue report unless you prefer to move to the discussion to the other one. |
Please report progress here, thanks :-) |
Hey Carlos,
Alright, let's get debuggin'! :) |
Okay, I'm still having trouble compiling this, but it appears to be a py2app problem with symlinks. I noticed here in #2209 someone also came across similar issues. I'm wondering if we can close both of these threads and start an entirely new thread to recruit people to help me figure out an alternative way to build Spyder for OS X since going back to your versions of py2app, etc. did not seem to work for that person. Any thoughts on this @ccordoba12? Here's the error I'm getting when building it on OS X:
Comint exited abnormally with code 1 at Tue Mar 24 10:38:24 |
@statmobile, thanks a lot for keep working on this. I have no idea what that error could mean. I haven't encountered so far :-( |
No problem, I would like to help get this up and running for everyone on OS X. I am using the MacPorts install of Python and Qt. Based upon your OS X notes, you use homebrew Python and direct downloads of Qt 4. If you notice, this problem in py2app is choking on QtWebKit. I have installed Qt 5 (that's all I could find on their downloads website), but I'm not sure how I should handle this script when I'm using MacPorts: |
Unfortunately My recommendation is to forget about it for MacPorts. Also forget about those packages I recommend to install with
Maybe you need to install an additional port-package for it? |
Okay, more progress. Fixing pyqt4 from MacPorts was a bit of a rabbit hole, but that wasn't the issue. I did however install PySide in MacPorts, because I have a basic script just to prove you can do a web browser in Python Qt, and I was trying to run that in order to confirm the web framework worked. Well, apparently that helped, and now I'm crashing here:
Now, one thing I forgot to mention is that I have always been getting the following WARNINGs all along:
|
Better yet, is there a debug option that I'm not aware of when it comes to compiling with py2app? The struggle here is that I have no Traceback. |
I'm sorry I can't be of more help here. I haven't seen the errors you reported, nor I'm aware of debugging options for py2app. Once Anaconda 2.2 is released (expected for next week), I'll move the instructions to use it instead of Homebrew. I'll also move the repo from Bitbucket to Github :-) I think those changes will help us to have a more reliable way to build the app, for PY2 and 3. |
I looked it up, and I've been running it with:
That's been bringing me to a pdb prompt, and I came across issues with pylint and pep8 modules not being used appropriately in my MacPorts install. I am making progress, but are you saying I should table it, and wait for the Anaconda release? |
Well, we should be able to build the app with any underlying Python I'm just saying that I'll try to use Anaconda instead of Homebrew to El 25/03/15 a las 11:51, statmobile escribió:
|
I hit a brick wall, unfortunately anyway. I'll try to keep an eye open for when Anaconda 2.2 is released as well, and pick up from there. At least we'll both be starting from the same point there, and I've been meaning to try out Anaconda for a while. |
Okay, so I installed Anaconda 2.2, which I've been meaning to use for a while now. After setting up a base anaconda environment on OS X Yosemite, I did the following:
I did that last thing, because I seem to be having trouble loading ssl into the OS X app, which you can see in the Traceback here: Traceback (most recent call last):
File "create_app.py", line 115, in <module>
options={'py2app': OPTIONS}
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/py2app/build_app.py", line 659, in run
self._run()
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/py2app/build_app.py", line 865, in _run
self.run_normal()
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/py2app/build_app.py", line 959, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/py2app/build_app.py", line 1214, in create_binaries
platfiles = mm.run()
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/macholib/MachOStandalone.py", line 105, in run
mm.run_file(fn)
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/macholib/MachOGraph.py", line 84, in run_file
self.scan_node(m)
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/macholib/MachOGraph.py", line 110, in scan_node
m = self.load_file(filename, caller=node)
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/macholib/MachOGraph.py", line 93, in load_file
newname = self.locate(name, loader=caller)
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/macholib/MachOStandalone.py", line 23, in locate
newname = super(FilteredMachOGraph, self).locate(filename, loader)
File "/Users/blopes/anaconda/envs/spyder-venv/lib/python2.7/site-packages/macholib/MachOGraph.py", line 49, in locate
loader=loader.filename)
TypeError: dyld_find() got an unexpected keyword argument 'loader' |
I solved this problem. Unfortunately, Qt in Anaconda is not build as a framework, so it can't be used to build the app. However, a couple of weeks ago I tried to build the app again with Homebrew, and I'm almost sure the problem we're seeing is a bug in py2app. So there is nothing we can do to move things further for now :-( |
For the kids at home, FYI, I only used boltons for debugging, it wasn't necessary in building Spyder. I agree, in the deep dungeons of Google I keep finding that py2app is probably the root of the problem, and I even remember seeing someone advising to move away from it, but I can't find that StackExchange thread now. Should we take these issues upstream to py2app? Should we start forking for one of the alternatives on OS X as listed here? |
I'd like to create a minimal app with py2app to show the error to its upstream developers, but I haven't had time to do it. I'd like to try alternatives, but I invested a lot of time with py2app so I'd prefer to help solve py2app problems instead. But if you want to try another alternatives @statmobile, I'm fine with it :-) |
Unfortunately, I don't have much experience with GUI development thus far. I was hoping to learn by compiling Spyder for you, but I don't think I know enough to port this to something like cx_freeze. |
@statmobile, I updated our instructions to create the app on Mac 10.9+. Please try to follow them to see if you can create the app now. About the error you mentioned in #1957 (comment), just look for the faulty line mentioned in the traceback and change it from
to
See this bug report https://bitbucket.org/ronaldoussoren/py2app/issue/137/py2app-problems-using-enthought-python for reference. I used the new instructions to generate a Python 3 app, and now everything seems to be working fine :-) I'll upload a new dmg tomorrow. |
I uploaded a new app for Python 3 but only to our Bitbucket page. @statmobile and @blink1073, could you quickly test the app to see if everything is working as expected for you? @blink1073, the main issue with this app has been its inability to start Python and IPython consoles, so that should be the main thing to look at :-) |
Another thing I forgot to mention: this new app requires 10.9+ (i.e. it doesn't work on older Mac versions). |
I had to change my security settings because it doesn't fit the "identified developers" condition to open non app store downloads on OS X. Other than that, the console opens up to ipython 3.4 perfectly!!! Thanks @ccordoba12!!! I wish I could have done more to help. |
@statmobile, you did enough by pinging me from time to time to solve this issue!! The main thing I changed was moving to 10.9 to create the app, and problem solved!! Now I have to see how to sign the app to avoid the error you mention. For that I'm going to remove the app for now and I upload it again when it's ready :-) |
No way, singing apps costs $99 per year, so it's a no go :-) I'll re-upload the same dmg again. @blink1073, please give it a simple test to see if it works for you too ;-) |
Hmm, we could try to raise the money, because as I'm looking into it there doesn't seem to be any exclusions for open source projects (typical Apple). Now that I think about it, I don't think I've seen any links for contributions to the Spyder project. Once I start my next job I'd be more than happy to throw some money to the overall project and you. :-) |
Thanks for your offer @statmobile!! :-) We're trying to setup the right channels to accept donations. We plan to have that ready next month. |
@ccordoba12, I wasn't able to install the app, even when allowing Apps from "Anywhere". However, when I launch the App, I can import numpy and get completions in both terminals. |
@blink1073, what do you mean by this?
To install the app you only need to drag and drop it to the By the way, it's really good to know that both consoles are working for you too!! |
In the dialogue that comes up, there is a Spyder icon and an Applications folder icon. When I try and drag the Spyder icon onto the the other, I get a cursor showing me it is not allowed, and it refuses to move/install. I ran it by just double-clickibg on the Spyder icon. — On Wed, May 27, 2015 at 2:19 PM, Carlos Cordoba [email protected]
|
Maybe your account doesn't have admin permissions. But thanks for the clarification :-) |
Yeah, I was blocked from dragging into the Applications folder as well. This is why I think we should look into raising money for the developer account, because if you have admin access you need to go to System Preferences > Security & Privacy > General > Allow apps downloaded from: Anywhere You can install it manually in the Finder then, and then you can reset it to Mac Store or Mac Store and identified developers after installing it. |
@statmobile, thanks a lot for the clarification. Then we definitely need to sign the app. |
I'd say this issue is (finally) solved. One last thing for @statmobile: Should we sign our Python 2 app too? Or that is not necessary? |
Sorry for the delay, that new job I mentioned entails me moving to a new location so I'll be off and on over the next couple of weeks lining that up. I just installed Spyder-Py2, which oddly did just let me drag it into my Applications folder, but it looks like it's the same issue with the latest OS X release (10.10.3). It won't let me open an unsigned app unless I change that security setting I mentioned earlier. |
From [email protected] on 2014-09-03T15:12:41Z
Spyder Version: 2.3.0
Python Version: 2.7.7
Qt Version : 4.8.6, PyQt4 (API v2) 4.10.4 on Darwin
pyflakes >=0.5.0: 0.8.1 (OK)
pep8 >=0.6 : 1.5.7 (OK)
IPython >=0.13 : 2.1.0 (OK)
pygments >=1.6 : 1.6 (OK)
sphinx >=0.6.6 : 1.2.2 (OK)
psutil >=0.3 : 2.1.1 (OK)
rope >=0.9.2 : 0.10.2 (OK)
matplotlib >=1.0: 1.4.0 (OK)
sympy >=0.7.0 : 0.7.5 (OK)
pylint >=0.25 : 1.2.1 (OK)
I have set the Python interpreter executable binary to my MacPorts install of Python 3.4.1 (/opt/local/bin/python). Now when I'm interacting in the console in Spider I get:
I get the following Traceback in the Internal console:
DON'T USE THIS CONSOLE TO RUN CODE!
It's used to report application errors
and to inspect Spyder internals with
the following commands:
spy.app, spy.window, dir(spy)
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Please provide any additional information below
.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1957
The text was updated successfully, but these errors were encountered: