Python 库安装 macports

发布于 2024-09-07 05:28:35 字数 563 浏览 2 评论 0原文

我想安装:

A. Mod python 在普通 Macbookpro (MacOSX 10.6.4) 上 B. 和 MySQL for Python 在同一台计算机上。

而且安装总是失败。


问题1:有关于如何在Mac OS 上实现这一点的教程吗?

我也希望能够使用 Macports 来实现这一点。 我在 Macports 和安装 python 方面有过不好的经历。

我确信这是由于我不理解以下概念:

  • ports
  • profile (pythonpath)

问题 2: 我必须在 .profile 中编写什么才能使 python 识别包?


问题3:端口到底是什么?

一般来说,了解如何快速有效地在 python 中安装包会很棒。

Apple 的 Python 内置版本似乎也有一些设置,如果更改,可能会让你的生活变得困难。


问题4:任何关于这个问题的详细经验或建议都会非常有帮助。

快速开始编程。

谢谢!

I would like to install:

A. Mod python on a regular Macbookpro (MacOSX 10.6.4)
B. And MySQL for Python on the same computer.

And the installation is constantly failing.


Question 1: Is there a tutorial on how to achieve this on Mac OS?

I also hoped that I could use Macports for this.
I had bad experience with Macports and installing python.

I am sure this is due to my not understanding the concept of:

  • ports
  • profile (pythonpath)

Question 2: What would I have to write in the .profile to make packages be recognized by python?


Question 3: What exactly is a port?

In general it would be awesome to get an understanding on how to install packages in python quick and effectively.

Also the build in version of Python by Apple seems to have settings, that, if changed can make your life difficult.


Question 4: Any detailed experience or advice on this issues would he very helpful.

For a quick start into programming.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猥︴琐丶欲为 2024-09-14 05:28:35

这个答案已经过时,请参阅下面 Mark 的回复

我在 osx 上安装 python 和 python 库时遇到了麻烦,这就是我最终修复它的方法:

使用 macports 我安装了 python26 和 python_select。然后使用 python_select 从默认的 python26-apple 更改为 python26(来自 macports)。现在,当您使用 macports 安装任何 python26 库时,它就会正常工作。

这种方法的主要缺点之一是 macports 从源代码安装所有内容,与使用预构建的二进制文件相比,这很慢且有错误,但对我来说,能够通过 macports 管理我的大部分 FOSS 软件是值得的。

This answer is outdated, see Mark's response below

I had trouble installing python and python libraries on osx, and this is what I ended up doing to fix it:

Using macports I installed python26 and python_select. Then use python_select to change from the default python26-apple to python26 (which is from macports). Now when you use macports to install any python26 library it will just work.

One of the main drawbacks of this approach is that macports installs everything from source, which is slow and buggy compared to using pre-build binaries, but for me it's worth it to be able to manage most of my FOSS software through macports.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文