osx lion 上的默认 python
问题是 osx python 使用默认命令 python
。这意味着,例如,如果您从 macports 安装 py-pil,osx python 将找不到此模块。使用 macports 安装 python27
后,我可以使用名为 python-2.7
的命令。早些时候有一个名为 python_select
的实用程序,现在它完全消失了,看:
Romans-MacBook:~ holms$ ls /opt/local/bin/python*
/opt/local/bin/python2.7 /opt/local/bin/python2.7-config /opt/local/bin/pythonw2.7
Romans-MacBook:~ holms$ sudo port -v install python_select
---> Cleaning python_select
---> Removing work directory for python_select
我什至尝试从系统中完全删除 macports 并重新安装所有内容,仍然是相同的结果,python_select 徒劳地消失了。如果有人可以通过尝试下载 macports 并安装 python27 并使用 python_select 来确认这一点,那就太好了。因为我需要为某些软件编写一些 osx 的兼容性...并且很高兴知道 osx lion 中 python_select 的情况如何。
所以会有两个问题:
- lion中的python_select在哪里,
- 如何使默认的
python
命令使用macport python而不是osx one。
Problem is that default command python
is used by osx python. That means for example if you install py-pil from macports, osx python won't find this module. after python27
installed with macports, I have command called python-2.7
available. Earlier there was utility called python_select
now it's completely gone in a vain, look:
Romans-MacBook:~ holms$ ls /opt/local/bin/python*
/opt/local/bin/python2.7 /opt/local/bin/python2.7-config /opt/local/bin/pythonw2.7
Romans-MacBook:~ holms$ sudo port -v install python_select
---> Cleaning python_select
---> Removing work directory for python_select
I even tried to remove macports completely from system and reinstalled everything, still the same result, python_select is gone in a vain. If anybody could confirm this by trying to download macports and install python27 and use python_select it would be great. because I need to write some compability for osx for some software... and it would be great to know what's the situation with python_select in osx lion.
So there would be two questions:
- where is python_select in lion
- how to make default
python
command to use macport python and not osx one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MacPorts 删除了
python_select
功能,改用port select
。请参阅:
MacPorts removed the
python_select
functionality, useport select
instead.See: