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=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