Skip to content
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

Closed
spyder-bot opened this issue Feb 17, 2015 · 44 comments
Closed

Python 3 Mac app can't start Python or IPython consoles #1957

spyder-bot opened this issue Feb 17, 2015 · 44 comments

Comments

@spyder-bot
Copy link
Collaborator

From statmob...@gmail.com 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:

abc = 2
print(ab...)

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)

Traceback (most recent call last):
File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/spyderlib/widgets/shell.py", line 298, in keyPressEvent
self.postprocess_keyevent(event)
File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/spyderlib/widgets/shell.py", line 727, in postprocess_keyevent
ShellBaseWidget.postprocess_keyevent(self, event)
File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/spyderlib/widgets/shell.py", line 358, in postprocess_keyevent
self._key_tab()
File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/spyderlib/widgets/shell.py", line 759, in _key_tab
self.show_code_completion(automatic=False)
File "/Applications/Spyder.app/Contents/Resources/lib/python2.7/spyderlib/widgets/shell.py", line 900, in show_code_completion
b_k_g = dir(builtins)+self.get_globals_keys()+keyword.kwlist
TypeError: can only concatenate list (not "NoneType") to list

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

@spyder-bot
Copy link
Collaborator Author

From statmob...@gmail.com on 2014-09-03T13:16:12Z

My apologies for not following the appropriate format, as you may guess, this is my first bug report.

@spyder-bot
Copy link
Collaborator Author

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)
Labels: MS-v2.3.2 Cat-Console

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-10-31T15:13:25Z

Labels: -MS-v2.3.2 MS-v2.3.3

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-01-08T15:31:37Z

I can't reproduce this bug. Are you still seeing it?

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-01-10T11:21:51Z

Labels: -MS-v2.3.3 MS-v2.3.4

@spyder-bot
Copy link
Collaborator Author

From statmob...@gmail.com 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]
Path: /opt/local/Library/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.4.2 (3.4.2)
Code Type: X86-64 (Native)
Parent Process: Spyder-Py2 [20484]
Responsible: Spyder-Py2 [20484]
User ID: 501

Date/Time: 2015-01-10 15:07:40.260 -0500
OS Version: Mac OS X 10.10.1 (14B25)
Report Version: 11
Anonymous UUID: B01F5146-668A-2E31-D8AB-B1020F540CE6

Sleep/Wake UUID: 1360B5BD-D857-46CA-870C-C65A2EB6BFD9

Time Awake Since Boot: 100000 seconds
Time Since Wake: 5100 seconds

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff8c92f282 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff890f2b73 abort + 129
2 org.python.python 0x0000000103eec4f8 Py_FatalError + 142
3 org.python.python 0x0000000103eec43d _Py_InitializeEx_Private + 1291
4 org.python.python 0x0000000103f008e0 Py_Main + 1840
5 org.python.python 0x0000000103e28e27 0x103e27000 + 7719
6 libdyld.dylib 0x00007fff8bae25c9 start + 1

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff5bdd85e8 rdx: 0x0000000000000000
rdi: 0x0000000000000713 rsi: 0x0000000000000006 rbp: 0x00007fff5bdd8610 rsp: 0x00007fff5bdd85e8 r8 : 0x00007fff5bdd80e0 r9 : 0x00007fff5bdd8160 r10 : 0x0000000008000000 r11 : 0x0000000000000206 r12 : 0x00007fc708c094b0 r13 : 0x00000001042270e8 r14 : 0x00007fff7233c300 r15 : 0x00007fff72a88c50
rip: 0x00007fff8c92f282 rfl: 0x0000000000000206 cr2: 0x00007fff72a85fd8

Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133

Binary Images:
0x103e27000 - 0x103e28fff +org.python.python (3.4.2 - 3.4.2) <326344F1-2D8C-3584-87DE-1BA47A71D729> /opt/local/Library/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python
0x103e2e000 - 0x103f83fff +org.python.python (3.4.2, [c] 2004-2014 Python Software Foundation. - 3.4.2) /opt/local/Library/Frameworks/Python.framework/Versions/3.4/Python
0x1040a2000 - 0x1040abfff +libintl.8.dylib (0) /opt/local/lib/libintl.8.dylib
0x1040b7000 - 0x1041abff7 +libiconv.2.dylib (0) <36C9F2DF-0491-329B-A815-BE8E32899D49> /opt/local/lib/libiconv.2.dylib
0x7fff6296a000 - 0x7fff629a0837 dyld (353.2.1) <4696A982-1500-34EC-9777-1EF7A03E2659> /usr/lib/dyld
0x7fff81fbc000 - 0x7fff81fbdfff libDiagnosticMessagesClient.dylib (100) <2EE8E436-5CDC-34C5-9959-5BA218D507FB> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff8308d000 - 0x7fff83098fff libcommonCrypto.dylib (60061) /usr/lib/system/libcommonCrypto.dylib
0x7fff830c0000 - 0x7fff83114fff libc++.1.dylib (120) <1B9530FD-989B-3174-BB1C-BDC159501710> /usr/lib/libc++.1.dylib
0x7fff83115000 - 0x7fff8313dfff libxpc.dylib (559.1.22) <9437C02E-A07B-38C8-91CB-299FAA63083D> /usr/lib/system/libxpc.dylib
0x7fff835e4000 - 0x7fff8362aff7 libauto.dylib (186) /usr/lib/libauto.dylib
0x7fff83696000 - 0x7fff8369afff libsystem_stats.dylib (163.1.4) <1DB04436-5974-3F16-86CC-5FF5F390339C> /usr/lib/system/libsystem_stats.dylib
0x7fff8449d000 - 0x7fff84682ff3 libicucore.A.dylib (531.30) /usr/lib/libicucore.A.dylib
0x7fff846bc000 - 0x7fff846e6ff7 libdispatch.dylib (442.1.4) <502CF32B-669B-3709-8862-08188225E4F0> /usr/lib/system/libdispatch.dylib
0x7fff8568c000 - 0x7fff856a8ff7 libsystem_malloc.dylib (53.1.1) <19BCC257-5717-3502-A71F-95D65AFA861B> /usr/lib/system/libsystem_malloc.dylib
0x7fff85810000 - 0x7fff85826ff7 libsystem_asl.dylib (267) /usr/lib/system/libsystem_asl.dylib
0x7fff858cb000 - 0x7fff858ccff7 libsystem_blocks.dylib (65) <9615D10A-FCA7-3BE4-AA1A-1B195DACE1A1> /usr/lib/system/libsystem_blocks.dylib
0x7fff85ee4000 - 0x7fff85ee6fff libsystem_configuration.dylib (699.1.5) <9FBA1CE4-97D0-347E-A443-93ED94512E92> /usr/lib/system/libsystem_configuration.dylib
0x7fff85f82000 - 0x7fff85f83ffb libremovefile.dylib (35) <3485B5F4-6CE8-3C62-8DFD-8736ED6E8531> /usr/lib/system/libremovefile.dylib
0x7fff85f87000 - 0x7fff85f90fff libsystem_pthread.dylib (105.1.4) <26B1897F-0CD3-30F3-B55A-37CB45062D73> /usr/lib/system/libsystem_pthread.dylib
0x7fff86b43000 - 0x7fff86ed9fff com.apple.CoreFoundation (6.9 - 1151.16) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff87df3000 - 0x7fff87e1bfff libsystem_info.dylib (459) /usr/lib/system/libsystem_info.dylib
0x7fff87e1c000 - 0x7fff87e24ffb libcopyfile.dylib (118.1.2) <0C68D3A6-ACDD-3EF3-991A-CC82C32AB836> /usr/lib/system/libcopyfile.dylib
0x7fff89095000 - 0x7fff89121fff libsystem_c.dylib (1044.1.2) /usr/lib/system/libsystem_c.dylib
0x7fff891af000 - 0x7fff891b8ff7 libsystem_notify.dylib (133.1.1) <61147800-F320-3DAA-850C-BADF33855F29> /usr/lib/system/libsystem_notify.dylib
0x7fff892f1000 - 0x7fff892f1ff7 libunc.dylib (29) <5676F7EA-C1DF-329F-B006-D2C3022B7D70> /usr/lib/system/libunc.dylib
0x7fff8a796000 - 0x7fff8a7c1fff libc++abi.dylib (125) <88A22A0F-87C6-3002-BFBA-AC0F2808B8B9> /usr/lib/libc++abi.dylib
0x7fff8a8c3000 - 0x7fff8a8c9ff7 libsystem_networkextension.dylib (167.1.10) <29AB225B-D7FB-30ED-9600-65D44B9A9442> /usr/lib/system/libsystem_networkextension.dylib
0x7fff8ab72000 - 0x7fff8ad57267 libobjc.A.dylib (646) <3B60CD90-74A2-3A5D-9686-B0772159792A> /usr/lib/libobjc.A.dylib
0x7fff8b773000 - 0x7fff8b775ff7 libsystem_coreservices.dylib (9) <41B7C578-5A53-31C8-A96F-C73E030B0938> /usr/lib/system/libsystem_coreservices.dylib
0x7fff8b99e000 - 0x7fff8b9a4fff libsystem_trace.dylib (72....

@spyder-bot
Copy link
Collaborator Author

From statmob...@gmail.com on 2015-01-10T12:12:12Z

...1.3) /usr/lib/system/libsystem_trace.dylib
0x7fff8badf000 - 0x7fff8bae2ff7 libdyld.dylib (353.2.1) <19FAF435-C165-3374-9DEF-D7BBA7D61DB6> /usr/lib/system/libdyld.dylib
0x7fff8c6e7000 - 0x7fff8c6e9ff7 libquarantine.dylib (76) /usr/lib/system/libquarantine.dylib
0x7fff8c700000 - 0x7fff8c702ff7 libsystem_sandbox.dylib (358.1.1) /usr/lib/system/libsystem_sandbox.dylib
0x7fff8c703000 - 0x7fff8c714ff7 libsystem_coretls.dylib (35.1.2) /usr/lib/system/libsystem_coretls.dylib
0x7fff8c715000 - 0x7fff8c716fff libSystem.B.dylib (1213) /usr/lib/libSystem.B.dylib
0x7fff8c8ae000 - 0x7fff8c8bfff7 libz.1.dylib (55) <88C7C7DE-04B8-316F-8B74-ACD9F3DE1AA1> /usr/lib/libz.1.dylib
0x7fff8c919000 - 0x7fff8c936fff libsystem_kernel.dylib (2782.1.97) <93E0E0A9-75B6-3904-BB4E-4BC7C05F4B6B> /usr/lib/system/libsystem_kernel.dylib
0x7fff8d2fa000 - 0x7fff8d2faff7 liblaunch.dylib (559.1.22) <8A988924-8BE7-35FE-BF7D-322E90EFE49E> /usr/lib/system/liblaunch.dylib
0x7fff8d313000 - 0x7fff8d317fff libcache.dylib (69) <45E9A2E7-99C4-36B2-BEE3-0C4E11614AD1> /usr/lib/system/libcache.dylib
0x7fff8dd57000 - 0x7fff8dd5cff7 libmacho.dylib (862) <126CA2ED-DE91-308F-8881-B9DAEC3C63B6> /usr/lib/system/libmacho.dylib
0x7fff8e70b000 - 0x7fff8e710ff7 libunwind.dylib (35.3) /usr/lib/system/libunwind.dylib
0x7fff8e9df000 - 0x7fff8e9e6ff7 libcompiler_rt.dylib (35) /usr/lib/system/libcompiler_rt.dylib
0x7fff8ea24000 - 0x7fff8ea9afe7 libcorecrypto.dylib (233.1.2) /usr/lib/system/libcorecrypto.dylib
0x7fff8f846000 - 0x7fff8f847fff libsystem_secinit.dylib (18) <581DAD0F-6B63-3A48-B63B-917AF799ABAA> /usr/lib/system/libsystem_secinit.dylib
0x7fff8fd8e000 - 0x7fff8fdc6ffb libsystem_network.dylib (411) /usr/lib/system/libsystem_network.dylib
0x7fff901e6000 - 0x7fff901eefff libsystem_dnssd.dylib (561.1.1) <62B70ECA-E40D-3C63-896E-7F00EC386DDB> /usr/lib/system/libsystem_dnssd.dylib
0x7fff909df000 - 0x7fff909e7fff libsystem_platform.dylib (63) <64E34079-D712-3D66-9CE2-418624A5C040> /usr/lib/system/libsystem_platform.dylib
0x7fff90b4c000 - 0x7fff90b4cff7 libkeymgr.dylib (28) <77845842-DE70-3CC5-BD01-C3D14227CED5> /usr/lib/system/libkeymgr.dylib
0x7fff910ba000 - 0x7fff910eafff libsystem_m.dylib (3086.1) <1E12AB45-6D96-36D0-A226-F24D9FB0D9D6> /usr/lib/system/libsystem_m.dylib

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 63644
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=84.6M resident=64.5M(76%) swapped_out_or_unallocated=20.1M(24%)
Writable regions: Total=26.4M written=1196K(4%) resident=1660K(6%) swapped_out=0K(0%) unallocated=24.8M(94%)

REGION TYPE VIRTUAL

=========== =======
Kernel Alloc Once 4K
MALLOC 9.9M
MALLOC (admin) 16K
MALLOC_LARGE (reserved) 128K reserved VM address space (unallocated)
STACK GUARD 4K
Stack 16.0M
VM_ALLOCATE 8K
__DATA 1560K
__LINKEDIT 71.0M
__TEXT 13.6M
__UNICODE 544K
shared memory 4K

=========== =======
TOTAL 112.7M
TOTAL, minus reserved VM space 112.6M

Model: MacBookPro9,2, BootROM MBP91.00D3.B08, 2 processors, Intel Core i5, 2.5 GHz, 4 GB, SMC 2.2f44
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x802C, 0x384A54463235363634485A2D3147364D3120
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x802C, 0x384A54463235363634485A2D3147364D3120
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xF5), Broadcom BCM43xx 1.0 (7.15.124.12.10)
Bluetooth: Version 4.3.1f2 15015, 3 services, 19 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: APPLE HDD HTS547550A9E384, 500.11 GB
Serial ATA Device: HL-DT-ST DVDRW GS31N
USB Device: Hub
USB Device: FaceTime HD Camera (Built-in)
USB Device: Hub
USB Device: Hub
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: Apple Internal Keyboard / Trackpad
USB Device: IR Receiver
Thunderbolt Bus: MacBook Pro, Apple Inc., 25.1

@ccordoba12
Copy link
Member

@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?

@statmobile
Copy link

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.

@ccordoba12
Copy link
Member

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 ;-)

@statmobile
Copy link

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.

@ccordoba12 ccordoba12 changed the title Tab completion fails in Console with Python 3.4 Python 3 Mac app can't start Python or IPyhon consoles Mar 9, 2015
@ccordoba12 ccordoba12 modified the milestones: v2.4, v2.3.4 Mar 9, 2015
@ccordoba12
Copy link
Member

Please report progress here, thanks :-)

@statmobile
Copy link

Hey Carlos,
I'm getting ready to jump back in to compiling Spyder for Python 3 on OS X. A couple things just to confirm:

Alright, let's get debuggin'! :)

@statmobile
Copy link

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:

...
copying file /opt/local/Library/Frameworks/QtWebKit.framework/Contents/Info.plist -> /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtWebKit.framework/Contents/Info.plist
linking /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtWebKit.framework/QtWebKit -> Versions/4/QtWebKit
copying file /opt/local/Library/Frameworks/QtWebKit.framework/QtWebKit.prl -> /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtWebKit.framework/QtWebKit.prl
creating /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtWebKit.framework/Versions
creating /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtWebKit.framework/Versions/4
copying file /opt/local/Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit -> /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtWebKit.framework/Versions/4/QtWebKit
linking /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtWebKit.framework/Versions/Current -> 4
error: [Errno 17] File exists

Comint exited abnormally with code 1 at Tue Mar 24 10:38:24

@ccordoba12
Copy link
Member

@statmobile, thanks a lot for keep working on this. I have no idea what that error could mean. I haven't encountered so far :-(

@statmobile
Copy link

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:

symlink-qt.py

@ccordoba12
Copy link
Member

Unfortunately symlink-qt.py does nothing right now. I manually sim-linked my Qt installation (using the official Qt installers) to the corresponding package directory in Homebrew. The thing is Homebrew installs a different Qt version for each Mac version, so I thought that could break compatibility among Mac versions.

My recommendation is to forget about it for MacPorts. Also forget about those packages I recommend to install with pip. Just install everything with the ports command and try to build the app with py2app.


this problem in py2app is choking on QtWebKit

Maybe you need to install an additional port-package for it?

@statmobile
Copy link

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:

copying file /opt/local/Library/Frameworks/QtTest.framework/QtTest.prl -> /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtTest.framework/QtTest.prl
creating /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtTest.framework/Versions
creating /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtTest.framework/Versions/4
copying file /opt/local/Library/Frameworks/QtTest.framework/Versions/4/QtTest -> /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtTest.framework/Versions/4/QtTest
linking /Users/blopes/workspace/spyder/dist/Spyder-Py2.app/Contents/Frameworks/QtTest.framework/Versions/Current -> 4
error: [Errno 17] File exists

Now, one thing I forgot to mention is that I have always been getting the following WARNINGs all along:

creating build/bdist.macosx-10.10-x86_64/python2.7-standalone/app/lib-dynload
creating build/bdist.macosx-10.10-x86_64/python2.7-standalone/app/Frameworks
*** using recipe: virtualenv ***
*** using recipe: ftplib ***
*** using recipe: lxml ***
*** using recipe: PIL ***
*** using recipe: pyside ***
*** using recipe: xml ***
WARNING: ImportError in sip recipe ignored: No module named ipdb-0
WARNING: ImportError in sip recipe ignored: No module named Beaker-1
WARNING: ImportError in sip recipe ignored: No module named Mako-1
WARNING: ImportError in sip recipe ignored: No module named psutil-2
WARNING: ImportError in sip recipe ignored: No module named virtualenv-1
WARNING: ImportError in sip recipe ignored: No module named Bottleneck-1
WARNING: ImportError in sip recipe ignored: No module named pyobjc_core-3
WARNING: ImportError in sip recipe ignored: No module named ropemacs-0
WARNING: ImportError in sip recipe ignored: No module named scikit_learn-0
WARNING: ImportError in sip recipe ignored: No module named decorator-3
WARNING: ImportError in sip recipe ignored: No module named modulegraph-0
WARNING: ImportError in sip recipe ignored: No module named jsonschema-2
WARNING: ImportError in sip recipe ignored: No module named certifi-14
WARNING: ImportError in sip recipe ignored: No module named MarkupSafe-0
WARNING: ImportError in sip recipe ignored: No module named stevedore-0
WARNING: ImportError in sip recipe ignored: No module named altgraph-0
WARNING: ImportError in sip recipe ignored: No module named matplotlib-1
WARNING: ImportError in sip recipe ignored: No module named sympy-0
WARNING: ImportError in sip recipe ignored: No module named elpy-1
WARNING: ImportError in sip recipe ignored: No module named alabaster-0
WARNING: ImportError in sip recipe ignored: No module named jedi-0
WARNING: ImportError in sip recipe ignored: No module named Jinja2-2
WARNING: ImportError in sip recipe ignored: No module named stevedore-1
WARNING: ImportError in sip recipe ignored: No module named mistune-0
WARNING: ImportError in sip recipe ignored: No module named pandas-0
WARNING: ImportError in sip recipe ignored: No module named mccabe-0
WARNING: ImportError in sip recipe ignored: No module named seaborn-0
WARNING: ImportError in sip recipe ignored: No module named virtualenv_clone-0
WARNING: ImportError in sip recipe ignored: No module named Babel-1
WARNING: ImportError in sip recipe ignored: No module named numexpr-2
WARNING: ImportError in sip recipe ignored: No module named pandas-0
WARNING: ImportError in sip recipe ignored: No module named setuptools-14
WARNING: ImportError in sip recipe ignored: No module named ropemode-0
WARNING: ImportError in sip recipe ignored: No module named patsy-0
WARNING: ImportError in sip recipe ignored: No module named roman-2
WARNING: ImportError in sip recipe ignored: No module named nose-1
WARNING: ImportError in sip recipe ignored: No module named requests-2
WARNING: ImportError in sip recipe ignored: No module named pyobjc_framework_Cocoa-3
WARNING: ImportError in sip recipe ignored: No module named networkx-1
WARNING: ImportError in sip recipe ignored: No module named flake8-2
WARNING: ImportError in sip recipe ignored: No module named statsmodels-0
WARNING: ImportError in sip recipe ignored: No module named sphinx_rtd_theme-0
WARNING: ImportError in sip recipe ignored: No module named scikit_image-0
WARNING: ImportError in sip recipe ignored: No module named Pygments-2
WARNING: ImportError in sip recipe ignored: No module named argparse-1
WARNING: ImportError in sip recipe ignored: No module named rope-0
WARNING: ImportError in sip recipe ignored: No module named python_dateutil-2
WARNING: ImportError in sip recipe ignored: No module named pep8-1
WARNING: ImportError in sip recipe ignored: No module named pip-6
WARNING: ImportError in sip recipe ignored: No module named py2app-0
WARNING: ImportError in sip recipe ignored: No module named scipy-0
WARNING: ImportError in sip recipe ignored: No module named virtualenvwrapper-4
WARNING: ImportError in sip recipe ignored: No module named six-1
WARNING: ImportError in sip recipe ignored: No module named pbr-0
WARNING: ImportError in sip recipe ignored: No module named django
WARNING: ImportError in sip recipe ignored: No module named macholib-1
WARNING: ImportError in sip recipe ignored: No module named tornado-4
WARNING: ImportError in sip recipe ignored: No module named Sphinx-1
WARNING: ImportError in sip recipe ignored: No module named virtualenv-1
WARNING: ImportError in sip recipe ignored: No module named Django-1
WARNING: ImportError in sip recipe ignored: No module named virtualenvwrapper-4
*** using recipe: sip ***
*** using recipe: matplotlib ***
*** using recipe: pydoc ***
*** using recipe: docutils ***
*** using recipe: scipy ***
*** using recipe: ctypes ***
*** using recipe: numpy ***
*** using recipe: pyzmq ***
*** filtering dependencies ***
10545 total
49 filtered
157 orphaned
10496 remaining
*** create binaries ***
creating /Users/blopes/workspace/spyder/build/bdist.macosx-10.10-x86_64/python2.7-standalone/app/temp/AppKit

@statmobile
Copy link

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.

@ccordoba12
Copy link
Member

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.

@statmobile
Copy link

I looked it up, and I've been running it with:

python create_app.py py2app --debug-skip-macholib

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?

@ccordoba12
Copy link
Member

Well, we should be able to build the app with any underlying Python
installation. If you want to continue using MacPorts, I see no problem
with it :-)

I'm just saying that I'll try to use Anaconda instead of Homebrew to
build the app.

El 25/03/15 a las 11:51, statmobile escribió:

I looked it up, and I've been running it with:

|python create_app.py py2app --debug-skip-macholib
|

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?


Reply to this email directly or view it on GitHub
#1957 (comment).

@statmobile
Copy link

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.

@statmobile
Copy link

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:

  • Pip installs: jedi, py2app, boltons
  • conda installs: pyqt, ipython, matplotlib, pygments, jinja2,
    psutil, sphinx, PIL, pyflakes, rope, nose,
    sympy, pyzmq, pandas, statsmodels, scikit-learn,
    networkx, scikit-image, seaborn?
  • Macports install of openssl

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'

@ccordoba12
Copy link
Member

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 :-(

@statmobile
Copy link

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?

http://docs.python-guide.org/en/latest/shipping/freezing/

@ccordoba12
Copy link
Member

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 :-)

@statmobile
Copy link

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.

@ccordoba12
Copy link
Member

@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

loader=loader.filename

to

loader_path=loader.filename

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.

@ccordoba12
Copy link
Member

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 :-)

@ccordoba12
Copy link
Member

Another thing I forgot to mention: this new app requires 10.9+ (i.e. it doesn't work on older Mac versions).

@ccordoba12 ccordoba12 changed the title Python 3 Mac app can't start Python or IPyhon consoles Python 3 Mac app can't start Python or IPython consoles May 26, 2015
@statmobile
Copy link

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.

@ccordoba12
Copy link
Member

@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 :-)

@ccordoba12
Copy link
Member

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 ;-)

@statmobile
Copy link

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. :-)

@ccordoba12
Copy link
Member

Thanks for your offer @statmobile!! :-) We're trying to setup the right channels to accept donations.

We plan to have that ready next month.

@blink1073
Copy link
Member

@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.

@ccordoba12
Copy link
Member

@blink1073, what do you mean by this?

I wasn't able to install the app, even when allowing Apps from "Anywhere"

To install the app you only need to drag and drop it to the /Applications folder.

By the way, it's really good to know that both consoles are working for you too!!

@blink1073
Copy link
Member

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. 


Sent from Mailbox

On Wed, May 27, 2015 at 2:19 PM, Carlos Cordoba notifications@github.com
wrote:

@blink1073, what do you mean by this?

I wasn't able to install the app, even when allowing Apps from "Anywhere"
To install the app you only need to drag and drop it to the /Applications folder.

By the way, it's really good to know that both consoles are working for you too!!

Reply to this email directly or view it on GitHub:
#1957 (comment)

@ccordoba12
Copy link
Member

Maybe your account doesn't have admin permissions. But thanks for the clarification :-)

@statmobile
Copy link

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.

@ccordoba12
Copy link
Member

@statmobile, thanks a lot for the clarification. Then we definitely need to sign the app.

@ccordoba12 ccordoba12 modified the milestones: v2.3.5, v3.0 Jun 1, 2015
@ccordoba12
Copy link
Member

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?

@statmobile
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants