Page 1 of 1
Configuring python for coppelia in ubuntu 24.04
Posted: 23 Jun 2024, 23:33
by tttbarros
Hi! I was researching how to configure python inside coppelia in ubuntu 24.04. I've already configured it in windows, by setting python in the file usrset.txt located at C:\Users\user\AppData\Roaming\CoppeliaSim and installing zmq and cbor libraries.
How can i do that procedure for ubuntu?
Thanks in advance
Re: Configuring python for coppelia in ubuntu 24.04
Posted: 24 Jun 2024, 06:23
by coppelia
Hello,
on Ubuntu 24, Python is safeguarded to prevent users from causing system-wide damage. To manage Python-related tasks and specific packages without risking the system's integrity, it is recommended to use a virtual environment, which isolates dependencies and configurations for individual projects. You could do something like following, using
venv:
Code: Select all
sudo apt install python3-pip
sudo apt install python3.12-venv
python3 -m venv myConfiguration
source myConfiguration/bin/activate
You'll have to make sure to always first source
myConfiguration as the first instruction in a new terminal, to make sure the virtual environment is activated. Then you can use Python as previously, e.g. installing new packages, etc, e.g.:
Code: Select all
pip3 install pyzmq
pip3 install cbor2
And you should not need to modify anything in
usrset.txt in that case.
Cheers