【发布时间】:2016-11-10 13:28:22
【问题描述】:
我的 15.10 Ubuntu 机器上有 numpy 1.11,我需要在 12.04 机器上使用相同的版本。我不确定这是否可能,并且对 linux 了解不够了解。
我试过了
sudo pip install numpy --upgrade
sudo apt-get dist-upgrade
我尝试重新安装等,但似乎没有任何效果。这些库是根本不兼容还是有办法做到这一点?
我不想弄乱 ubuntu 版本,因为这是一个共享的实验室机器,我担心如果我这样做了其他人的实验可能会出现问题。
编辑:当我运行升级时,它说它已成功安装,但没有说明版本。
这是我运行升级时输出的结尾:
types -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/numpy/random/mtrand/mtrand.o build/temp.linux-x86_64-2.7/numpy/random/mtrand/randomkit.o build/temp.linux-x86_64-2.7/numpy/random/mtrand/initarray.o build/temp.linux-x86_64-2.7/numpy/random/mtrand/distributions.o -Lbuild/temp.linux-x86_64-2.7 -o build/lib.linux-x86_64-2.7/numpy/random/mtrand.so
Creating build/scripts.linux-x86_64-2.7/f2py
adding 'build/scripts.linux-x86_64-2.7/f2py' to scripts
changing mode of build/scripts.linux-x86_64-2.7/f2py from 644 to 755
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution
changing mode of /usr/local/bin/f2py to 755
Successfully installed numpy
Cleaning up...
当我检查我的版本时:
>>> import numpy
>>> numpy.version.version
'1.8.2'
【问题讨论】:
-
我可以建议接受答案吗?