8 月 132019
 

最近需要涉及到机器学习需要安装mpi4py,之前一直安装有问题,后来通过官网文档,发现安装办法,特此记录:

参考文档:https://mpi4py.readthedocs.io/en/stable/install.html

https://mpi4py.readthedocs.io/en/stable/appendix.html#building-mpi

参考命令:

下载安装包:

wget http://www.mpich.org/static/downloads/3.3.1/mpich-3.3.1.tar.gz

wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-3.0.2.tar.gz

安装命令:

tar -zxvf mpich-3.3.1.tar.gz

cd mpich-3.3.1/

./configure –prefix=/usr/local/mpi

make && make install

cd mpi4py-3.0.2/

/root/anaconda3/bin/python setup.py build –mpicc=/usr/local/mpi/bin/mpicc

/root/anaconda3/bin/python setup.py install

验证:

/root/anaconda3/bin/python -c “import mpi4py; print(mpi4py);from mpi4py import MPI”

 

 

补充:

1.遇到了

ERROR: Cannot uninstall ‘wrapt’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

办法1:输入 pip install -U –ignore-installed wrapt enum34 simplejson netaddr

参考:https://www.cnblogs.com/xiaowei2092/p/11025155.html

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny