Python & Django on a Mac: Illegal hardware instruction

江枫思渺然 提交于 2021-01-27 17:30:43

问题


Here is my issue: I installed Python and Django on my mac. When I run "django-admin.py startproject test1" I get this error:

1 11436 illegal hardware instruction django-admin.py startproject test1 (the number is always different)

I've tested with multiple Django versions, and this only happens with version 1.4 and higher...1.3 works fine.

I've been searching the web like crazy for the past week, and couldn't find anything regarding this issue with django so I assume the problem is not Django itself but something else. This is only on my mac at home, at work where I user Ubuntu works fine.

I tried to reinstall my entire system and this are the only things I have installed right now: - Command line tools - Homebrew - Python & pip (w/ Homebrew) - Git (w/ Homebrew) - zsh (.oh-my-zsh shell)

I set up my virtualenv and install django 1.5.1 -- the same issue still appears.

I'm out of options for now since nothing I found resolves my problem, I'm hoping someone has some knowledge about this error.

I appreciate all the help, and thanks.

This is the python crash log:

Process: Python [2597] Path: /usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 2.7.4 (2.7.4) Code Type:
X86-64 (Native) Parent Process: zsh [2245] User ID: 501

Date/Time: 2013-05-05 20:53:19.899 +0200 OS Version: Mac OS X 10.8.3 (12D78) Report Version: 10

Interval Since Last Report: 16409 sec Crashes Since Last Report: 2 Per-App Crashes Since Last Report: 1 Anonymous UUID: D859C141-544F-3473-1A13-F984DB2F8CBE

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

Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000


回答1:


that kind of problem smells like architecture mess. You may try to execute a 64bit library from a 32bit interpreter or vice versa… As you're using homebrew, you shall be really careful of which interpreter you're using, what is your path etc… Maybe you shall trace your program to know more exactly where it fails, so you can pinpoint what is actually failing. It is very unlikely django that fails, but more something that django uses. For someone to help you, you need to dig more closely to your failing point, and give more context about what is failing beyond django.



来源:https://stackoverflow.com/questions/16386707/python-django-on-a-mac-illegal-hardware-instruction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!