6.2 PUIAS i386_64 上的 Python-2.7.2
我不是一个普通的 Linux 用户,所以这可能是一个完全微不足道的问题。由于 NetBSD 的 NVidia 驱动程序不可用,我在一台基于 GPU 的“超级”计算机上运行 6.2 PUIAS 版本 i386_64。安装的Python版本是2.6.6。我需要 2.7.2 Python 和更新版本的 scipy、numpy、matlibplot 和朋友。我启用了 PUIAS 和 EPEL 存储库。但是他们没有更新版本的 Python。在不中断依赖于它的系统的情况下安装较新版本的Python的“推荐”方法是什么?由于缺乏科学计算库,我对 Python 3.2 不感兴趣。
I am not a regular Linux user so this might be completely trivial question. I am running 6.2 PUIAS version i386_64 on one of my GPU based "super" computers due to the unavailability of NVidia drivers for NetBSD. The installed version of Python is 2.6.6. I need 2.7.2 Python and newer version of scipy, numpy, matlibplot and friends. I have PUIAS and EPEL repositories enabled. However they do not have newer versions of Python. What is the "recommended" way to install newer version of Python without braking the system which depends on it. I am not interested in Python 3.2 due to the lack of libraries for scientific computing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当 install-Python-from-source 例程 告诉您使用 < code>make install,请输入
make altinstall
。这将使正常的python
可执行文件保持不变,而是创建python2.7
供您使用。使用这个新的可执行文件从源代码安装其他包。不要忘记相应地更改脚本中的 shebang 行。When the install-Python-from-source routine tells you to use
make install
, typemake altinstall
instead. This will leave the normalpython
executable untouched and instead createpython2.7
for you to use. Install the other packages from source using this new executable. Don't forget to change the shebang line in your scripts accordingly.我要回答我自己的问题。对于在 RedHat 克隆(例如 PUIAS)上使用 Python 进行科学计算的人来说,获得所需的一切的最简单方法是使用 rpm 包管理器和 Enthought Python Distribution(简称EPD)。 EPD 将所有内容安装在沙箱中,因此基于过时 Python 版本的系统工具不会聚集在一起。但是,必须针对系统调整路径,甚至在用户基础上更容易调整路径,以便使用 shell 调用非系统工具。除非您对 Python 本身感兴趣或对将其移植到您最喜欢的操作系统而不是对您自己的研究感兴趣,否则永远不应该从源代码编译 Python!
I am going to answer my own question. For people who are using Python for scientific computing on RedHat clones (PUIAS for example) the easiest way to get all they need is to use rpm package manager and Enthought Python Distribution (EPD for short). EPD installs everything in a sandbox so system tools which are based on an obsolete version of Python are not massed up. However, paths have to be adjusted for system or even easier on the user base so that the using shell invokes non-system tools. One should never compile Python from source unless you are interesting in Python itself or in porting it to your favorite operating system rather than in your own research!