pythonocc的安装

雍兴修
2023-12-01

https://pythonocc.wordpress.com/2013/03/04/installing-on-ubuntu-12-04/
官方教程
https://github.com/tpaviot/oce/blob/master/BUILD.Unix.md
https://github.com/tpaviot/pythonocc-core/blob/master/INSTALL.md

git clone git://github.com/tpaviot/pythonocc-core.git
cd pythonocc-core
mkdir cmake-build
cd cmake-build
cd /home/xx/CODE/PythonENV/p3env
source ./bin/activate
cd ~/pythonocc-core/cmake-build
cmake -DPYTHON_EXECUTABLE:PATH=/home/xx/CODE/PythonENV/p3env -DPYTHON_LIBRARY:PATH=/home/xx/CODE/PythonENV/p3env/lib/python3.7/config-3.7m-x86_64-linux-gnu/libpython3.7m.a -DOCE_INCLUDE_PATH=/usr/include/oce -DOCE_LIB_PATH=/usr/lib -DPYTHONOCC_INSTALL_DIRECTORY:PATH=/home/xx/CODE/PythonENV/p3env/lib/python3.7/site-packages/OCC …/

swig升级
1、官网下载swig-3.0.12.tar.gz;

2、解压到指定目录;

3、进入解压后的目录,依次运行指令:

bash ./configure --prefix=/usr/local/swig-3.0.12 --without-pcre【即不需要安装pcre依赖】

make && make install

4、蓝后,配置环境变量:
sudo gesit /etc/profile
添加
export SWIG_PATH=/usr/local/swig-3.0.12/bin
export PATH= S W I G P A T H : SWIG_PATH: SWIGPATH:PATH
执行
source /etc/profile
5、保存,使环境变量生效;

6、运行swig -version查看版本信息:

SWIG Version 3.0.12

Compiled with g++ [x86_64-pc-linux-gnu]

Configured options: -pcre

Please see http://www.swig.org for reporting bugs and further information

https://github.com/tpaviot/pythonocc-core/issues/649
https://github.com/tpaviot/pythonocc-core/issues/594
conda install -c conda-forge -c dlr-sc -c tpaviot -c oce -c pythonocc pythonocc-core==0.18.2

 类似资料: