Any plan to upgrade Python to 3.x?

209 views
Skip to first unread message

WaHaHa

unread,
Mar 25, 2021, 2:33:32 AM3/25/21
to ROS Sig Aldebaran
Hi Softbank,

Is there any plan to support Python 3.x in the near future? Many new libraries can’t be run on Ptyhon 2.7.

Best Regards,
WaHaHa

vigneshp...@gmail.com

unread,
Sep 7, 2022, 6:23:46 AM9/7/22
to ROS Sig Aldebaran
For me I managed to get it running on python 3.10 in Ubuntu 22.04 by compiling the libraries from source.

First by downloading and compiling boost 1.77 (I had some issues with the version installed by apt-get):

unzip boost_1_77_0.zip
cd boost_1_77_0
./bootstrap.sh
./b2
export $LD_LIBRARY_PATH= $LD_LIBRARY_PAT: /path/to/boost_1_77_0/stage/lib
Then I downloaded libqi and in CMakeLists.txt, I added the following lines before the boost definitions (change the Boost path to where you will have it):

#### Set Boost Path
set(BOOST_ROOT "/path/to/boost_1_77_0")
set(BOOST_INCLUDEDIR "${BOOST_ROOT}")
set(BOOST_LIBRARYDIR "${BOOST_ROOT}/libs")
set(BOOST_STAGE_PATH "${BOOST_ROOT}/stage/lib")
####

and then compiled it according to the instructions.

Then I downloaded libqi-python, added the same text above for Boost to CMakeLists.txt compiled it (slightly difference from what is given in the README):

mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH=/path/to/libqi/install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/boost_1_77_0/stage/lib
make
make install DESTDIR=/path/to/libqi-python/install
export PYTHONPATH=$PYTHONPATH:/path/to/libqi-python/install/python3.X/site-packages

After this, I was able to use qi in python3.

Hope this helps!
Thanks and Regards,
Vignesh Prasad

vigneshp...@gmail.com

unread,
Sep 8, 2022, 10:30:55 AM9/8/22
to ROS Sig Aldebaran
I created an additional script that simplifies and cleans up some of the steps above which I tested for Python3 on Ubuntu 22.04 and Boost 1.77: https://gist.github.com/souljaboy764/738b76c5bb6b76a8eb93ba7ae63862c9
Reply all
Reply to author
Forward
0 new messages