Issues setting Up your catkin_ws for Python3 environment on the Physical Jetson Nano

Hi,

I’m running your course in my “own” real Jetbot environment,

I followed steps to create the Python3 Environment and I’m stuck at this command “source ~/.py3venv/bin/activate”

Below are the errors:

ubuntu@grace:~$ cd ~/catkin_ws/src/my_catkin_ws_python3
ubuntu@grace:~/catkin_ws/src/my_catkin_ws_python3$ source ~/.py3venv/bin/activate
bash: /home/ubuntu/.py3venv/bin/activate: No such file or directory
ubuntu@grace:~/catkin_ws/src/my_catkin_ws_python3$ python3 --version
Python 3.6.9
ubuntu@grace:~/catkin_ws/src/my_catkin_ws_python3$ source ~/.catkin_ws_python3/bin/activate
bash: /home/ubuntu/.catkin_ws_python3/bin/activate: No such file or directory
ubuntu@grace:~/catkin_ws/src/my_catkin_ws_python3$

I even try the commands at Virtual env: no such file or directory - #3 by Robots4Space_Bapt

when I get up to here: sudo python -m virtualenv py3venv
I get this error : /usr/bin/python: No module named virtualenv

is there a way to resolve this?
I cannot move on further…,

Thanks

@albertoezquerro ,

Its been 3 days and I still got no replies…, please help!!!, I’m still stuck!!

catkin_make -DPYTHON_EXECUTABLE:FILEPATH=/home/ubuntu/catkin_ws/src/my_catkin_ws_python3/my_catkin_ws_python3/bin/python

I’m just following the course for my jetson nano and I got the ERRORS below and I cannot move on…,

You can also remote in and check if you like

Also, in this course, unit 2,

roscd jetbot_pkg

( It should take you to .catkin_ws_python3/src/jetbot_pkg)

This gives an error in the web shell:

SyntaxError: invalid syntax

roscd jetbot_pkg
File “”, line 1
roscd jetbot_pkg

jetbot_pkg does not even exists in the catkin_ws_python3/src/ path…, very very frustrating here!

@albertoezquerro , ANY UPDATES ON THIS PLEASE?

Hi,

Is because both .catkin_ws_python3 and .py3venv were created for this course. These are

  • .py3venv: This si a virtual environment for using python 3 in a python 2 system.
  • .catkin_ws_python3: Is a catkin_ws compiled after sourcing in the .py3venv.

So to make this work in your local system you first have to install venv elements to be able to create one of your own. Then create a catkin_ws and after sourcing the venv, do catkin_make.

mkdir -p /usr/local/share/venvs
&& sudo chown user:user -R /usr/local/share/venvs
&& virtualenv /usr/local/share/venvs/py3venv --python=python3
&& ln -s /usr/local/share/venvs/py3venv ~/.py3venv
&& source ~/.py3venv/bin/activate
&& pip install WAHTEVERYOU_NEED

sudo mkdir -p /usr/local/share/venvs/catkin_ws_python3/src
&& sudo chown user:user -R /usr/local/share/venvs/catkin_ws_python3
&& ln -sfv /usr/local/share/venvs/catkin_ws_python3 ~/.catkin_ws_python3
&& cd /home/user/.catkin_ws_python3/src
&& source ~/.py3venv/bin/activate \

Something like this you should do, depending on your system. Hope you can get it ;), but we cant give full support for each person that want to install things in their own systems.