Mac/Django 错误消息:“/mercurial/osutil.so:没有合适的 64 位架构”
我是 Mac 新手(对 Django 也很陌生),我正在新的 Macbook Pro 上设置一个现有的 Django/MySQL 站点,该站点使用 Mercurial 作为站点包。
安装过程中一切顺利 - 没有错误消息。我从 macports 安装了大多数软件包的默认版本。
但是,当我尝试 runserver 时,本地主机显示以下错误消息:
ImportError at /
.../lib/python2.6/site-packages/mercurial/osutil.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
请问有人可以建议吗?我尝试在终端输入以下内容:
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
但没有帮助。
I'm new to Macs (and quite new to Django) and I'm setting up an existing Django/MySQL site that uses Mercurial as a site package, on a new Macbook Pro.
All was going well during installation - no error messages. I installed the default versions of most packages from macports.
However when I try runserver, localhost shows the following error message:
ImportError at /
.../lib/python2.6/site-packages/mercurial/osutil.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
Please could anyone advise? I've tried typing the following at the terminal:
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
but it didn't help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也遇到过类似的错误,两个因素的结合帮助我安装了适用于 OS X Lion 的 Mercurial。我运行的是 OS X 10.7.3。
首先,setup.py 脚本的第 455 行有一个错误(至少对于 Mercurial 2.2.1,我尝试过的版本)。线路
应替换为
其次,在我安装 Mercurial 之后(通过 easy_install、Mac OS X 二进制安装程序和编译),我不断收到出现以下错误消息:
但是,在看到这篇文章后,我注意到
在我的系统上 输出 1。但是,运行这个命令
然后重新编译/安装 Mercurial 最终为我提供了一个工作可执行文件。
I've gotten a similar error and a combination of two things helped me install Mercurial for OS X Lion. I'm running OS X 10.7.3.
First, there is a bug on line 455 of the setup.py script (at least for Mercurial 2.2.1, the version I tried). The line
should be replaced with
Second, after I installed Mercurial (either by easy_install, Mac OS X binary installer, and compilation), I kept getting the following error message:
However, after seeing this post, I noticed that
outputs 1 on my system. However, running this command
and then recompiling / installing mercurial resulted in a working executable for me at the end.
如果我的评论中的所有内容均已通过,请尝试在用户环境变量中而不是在命令行中设置 Prefer-32-bit 。
编辑此文件:~/.MacOSX/environment.plist
请参阅:
http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html#//apple_ref/doc/ uid/20002093-113982
If everything from my comment checks out, try setting that Prefer-32-bit in an user environment variable instead of at the command line.
Edit this file: ~/.MacOSX/environment.plist
See:
http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html#//apple_ref/doc/uid/20002093-113982