我控制台访问我没有 root 或 sudo 权限的计算机。
Python 版本是 2.5.2,numpy 不可用。我不能使用 python setup.py install --user 机器上也没有任何可用的编译器。
我可以以某种方式使用可用的编译包https://edge.launchpad.net/~scipy/+archive/ppa/+packages而不安装它们吗?我尝试直接导入 numpy 模块,但它抱怨:
Python 2.5.2 (r252:60911, Jan 4 2009, 21:59:32)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/home/XXX/temp/python-numpy-1.2.1/numpy/__init__.py", line 121,
in <module>
raise ImportError(msg)
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python intepreter from there.
>>>
谢谢!
更新:系统管理员不会在机器上安装任何类型的软件(这是一个 VPS,我猜他们有一个标准的部署映像)。他们是疯狂的偏执狂,他们甚至不会告诉我他们运行的是什么风格的 unix,甚至 Apache 服务的版本号都被混淆了!这是我登录时获得的所有信息:
Linux server1 2.4.22 #4 SMP Wed Nov 5 17:44:16 CET 2003 i686 unknown
并用于编译:
python setup.py install --home=~
[...]
RuntimeError: Broken toolchain: cannot link a simple C program
猫 /proc/版本
Linux version 2.6.32.25-grsec-dh (root@dl345.dinaserver.com) (gcc version 4.3.2
(Debian 4.3.2-1.1) ) #2 SMP Wed Nov 3 13:21:01 CET 2010