sudo apt update
sudo apt upgrade
sudo apt install build-essential
sudo apt install python-is-python2
sudo apt install python2-dev
sudo apt install libode-dev
sudo apt install lib3ds-dev
sudo apt install freeglut3-dev
sudo apt install libboost-all-dev
■Download cgkit.
https://sourceforge.net/p/cgkit/code/ci/master/tree/
glmaterial.py, line 141, in _passPILImage
self.texData(w, h, format, GL_UNSIGNED_BYTE, img.tostring())
replaced tostring() with tobytes().
self.texData(w, h, format, GL_UNSIGNED_BYTE, img.tobytes())
■Download PyProtocol.
http://peak.telecommunity.com/dist/
■Download get-pip.py for 2.7.
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
# python get-pip.py
mak@mx:~/.local/bin
$ ./pip install pygame
$ ./pip install pyopengl
$ ./pip install serial
$ ./pip install pyode
$ ./pip install pillow
$ ./pip install scons
$ unzip PyProtocols-0.9.3.zip
$ sudo python setup.py --without-speedups install
$ ./pip list
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Package Version
----------- -------
future 0.18.3
iso8601 0.1.16
Pillow 6.2.2
pip 20.3.4
pygame 2.0.3
PyODE 1.2.1
PyOpenGL 3.1.7
PyProtocols 0.9.3
PyYAML 5.4.1
scons 3.1.2
serial 0.0.97
setuptools 44.1.1
wheel 0.37.1
$ cd ~/Downloads/cgkit-code/utilities/
mak@mx:~/Downloads/cgkit-code/utilities
$ python checkenv.py
----------------------------------------------------------------------
Python 2.7.18 (default, Jul 14 2021, 08:11:37)
[GCC 10.2.1 20210110]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ pygame 2.0.3 (SDL 2.0.16, Python 2.7.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. missing
cgkit (C++ lib)............... failed
The cgkit supportlib could not be imported. One possible reason for that
is that shared libraries (such as the boost_python runtime or OpenGL)
could not be found.
cgkit (all)................... failed
$ ls /usr/lib/x86_64-linux-gnu/libboost_python*.*
/usr/lib/x86_64-linux-gnu/libboost_python39.a
/usr/lib/x86_64-linux-gnu/libboost_python39.so
/usr/lib/x86_64-linux-gnu/libboost_python39.so.1.74.0
■Download following:
libboost-python1.67.0_1.67.0-17ubuntu8_amd64.deb
libboost-python1.67-dev_1.67.0-17ubuntu8_amd64.deb
$ dpkg -x libboost-python1.67.0_1.67.0-17ubuntu8_amd64.deb usr
$ dpkg -x libboost-python1.67-dev_1.67.0-17ubuntu8_amd64.deb usr
■Copy following:
libboost_python27.so
libboost_python27.so.1.67.0
libboost_python27.a
$ sudo cp libboost_python27*.* /usr/lib/x86_64-linux-gnu/
$ ls /usr/lib/x86_64-linux-gnu/libboost_python*.*
/usr/lib/x86_64-linux-gnu/libboost_python27.a
/usr/lib/x86_64-linux-gnu/libboost_python27.so
/usr/lib/x86_64-linux-gnu/libboost_python27.so.1.67.0
/usr/lib/x86_64-linux-gnu/libboost_python39.a
/usr/lib/x86_64-linux-gnu/libboost_python39.so
/usr/lib/x86_64-linux-gnu/libboost_python39.so.1.74.0
$ ls /usr/lib/x86_64-linux-gnu/lib3ds*.*
/usr/lib/x86_64-linux-gnu/lib3ds-1.so
/usr/lib/x86_64-linux-gnu/lib3ds-1.so.3.0.0
/usr/lib/x86_64-linux-gnu/lib3ds-1.so.3
/usr/lib/x86_64-linux-gnu/lib3ds.so
■scons
$ /home/mak/.local/bin/scons
■changed config.cfg
######################################################################
# Boost.Python settings
######################################################################
# Name of the Boost.Python library to link with
BOOST_LIB = "boost_python27"
####### Libd3DS #######
LIB3DS_AVAILABLE = True
LIB3DS_PATH = r"/usr/lib/x86_64-linux-gnu/"
#LIB3DS_LIBNAME = "lib3ds-120s"
■Build cgkit.
$ python setup.py build
1.Build error;
wrappers/py_arrayslots1.cpp: In function ‘void class_ArraySlots()’:
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
43 | #define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator
| ^~~~~~~~~~~
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
43 | #define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator
| ^~~~~~~~~~~
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
43 | #define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator
| ^~~~~~~~~~~
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
43 | #define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator
|
1.Build error;
[solved]
py_slot.h,line:43, Put blank spaces on both sides of sname.
>("_" sname "_Iterator",
2.Build error;
wrappers/py_geoms1.cpp: In member function ‘boost::python::api::object _VariableIterator::next()’:
wrappers/py_geoms1.cpp:145:24: error: could not convert ‘std::make_tuple(_Elements&& ...) [with _Elements = {std::__cxx11::basic_string
145 | return make_tuple(name, info.storage, info.type, info.multiplicity);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| std::tuple
wrappers/py_geoms1.cpp: In function ‘boost::python::api::object findVariable(support3d::GeomObject*, std::string)’:
wrappers/py_geoms1.cpp:166:22: error: could not convert ‘std::make_tuple(_Elements&& ...) [with _Elements = {std::__cxx11::basic_string
166 | return make_tuple(name, info->storage, info->type, info->multiplicity);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| std::tuple
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
2.Build error;
[solved]
py_geoms1.cpp,line:145 and line:166 boost::python::make_tuple
replaced make_tuple with boost::python::make_tuple.
---------------------------------------------------------------------------
■Install cgkit.
sudo python setup.py install --record files.txt
if you uninstall cgkit...
cat files.txt | sudo xargs rm -rf
mak@mx:~/Downloads/cgkit-code/utilities
$ python checkenv.py
-------------------------------------------------do ---------------------
Python 2.7.18 (default, Jul 14 2021, 08:11:37)
[GCC 10.2.1 20210110]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ pygame 2.0.3 (SDL 2.0.16, Python 2.7.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. 2.0.0 (Aug 12 2023)
cgkit (C++ lib)............... OK
cgkit (all)................... OK
$ viewer.py -N softimage demo1.py
$ viewer.py -N softimage demo4.py
pygame 2.0.3 (SDL 2.0.16, Python 2.7.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
Texname: 1
Loading "maps/uvmap.png"...
texturing is ok.
It is light and fun.
but pyode1.2.1 is old?
$ viewer.py -N softimage piddemo1.py
The ball moves freely.
Thank you for your support.
- -
- -