安装psbody

Windows系统

首先下载这个fork:

johnbanq/mesh at fix/MSVC_compilation (github.com)https://github.com/johnbanq/mesh/tree/fix/MSVC_compilation根据提示,先安装pyOpenGL,然后使用如下命令:

pip install --no-deps --install-option="--boost-location=<path_to_your_boost>" --verbose --no-cache-dir .

如果出现:

error: Microsoft Visual C++ 14.0 is required. 

可以按照这个帖子来安装:

Microsoft Visual C++ 14.0 is required解决方法 - 知乎 (zhihu.com)https://zhuanlan.zhihu.com/p/126669852再次尝试安装psbody,如果出现:

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

安装boost:

(59条消息) Boost(1):Boost库简介及安装_翔底的博客-优快云博客_boost库https://blog.youkuaiyun.com/rangfei/article/details/122276395记得修改“--boost-location”......

PS 1:如果出现zmq错误,则运行 pip install pyzmq

Ubuntu系统

1. 激活conda虚拟环境。

conda activate probtalk

2. 下载和解压boost包。[下载网址]

tar xzvf boost_1_88_0.tar.gz
cd boost_1_88_0

3. 设置python版本=3.8,进行安装。

./bootstrap.sh ./bootstrap.sh --with-python-version=3.8
./b2

 

4.安装mesh库。

git clone https://gitclone.com/github.com/MPI-IS/mesh
cd mesh
BOOST_INCLUDE_DIRS=/path/to/boost make all

5. 若出现 "crypt.h:No such file or directory",则在conda下安装:

conda install --channel=conda-forge libxcrypt
 
export CPATH=/opt/conda/include/

参考:

[1] https://zhuanlan.zhihu.com/p/620236724

[2] crypt.h:No such file or directory 亲测_fatal error: crypt.h: no such file or directory-优快云博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值