# Create Environment for Python3

**URL:** <https://get-help.theconstruct.ai/t/create-environment-for-python3/3022>\
**Category:** ROS Deep Learning With TensorFlow 101\
**Created:** [April 11, 2020, 10:16am UTC](https://get-help.theconstruct.ai/t/create-environment-for-python3/3022 "2020-04-11T10:16:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jalberola](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/jalberola/32/10_2.png) [@jalberola](https://get-help.theconstruct.ai/u/jalberola)\
**Post date:** [April 11, 2020, 10:16am UTC](https://get-help.theconstruct.ai/t/create-environment-for-python3/3022/1 "2020-04-11T10:16:37Z")

</div>

Hello,

I’ve created an environment for Python3 following the instructions of this video (min 20:40):

However, in the very first instructions of the Unit 1 of the course there are two other commands that I do not understand:

# Setup the Python3 ROS catkin\_ws environment

…  
source /home/user/.catkin\_ws\_python3/devel/setup.bash  
catkin\_make -DPYTHON\_EXECUTABLE:FILEPATH=/home/user/.py3venv/bin/python  
source devel/setup.bash

Could you clarify me why are the above instructions for? On my own machine I do not have the folder .catkin\_ws\_python3

Thanks  
Juan

---

<div class="post-metadata">

**Author:** ![duckfrost2](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/duckfrost2/32/9365_2.png) [@duckfrost2](https://get-help.theconstruct.ai/u/duckfrost2)\
**Post date:** [April 13, 2020, 8:27am UTC](https://get-help.theconstruct.ai/t/create-environment-for-python3/3022/2 "2020-04-13T08:27:49Z")

</div>

Hi,

In RobotIgniteAcademy, this folder ( /home/user/.catkin\_ws\_python3 ) is preinstalled. Its a workspace that we have with all the ROS packages compiled for python3, like the Tf of image package.  
By sourcing this and then compiling ( catkin\_make with the python3 virtual envirnment ) we are forcing that ROS compiles our catkin\_ws for Python3, instead of python2.

There are other ways of doing this, but this is one of them 😉

Hope I answered your question.

---

<div class="post-metadata">

**Author:** ![798419633](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/798419633/32/10_2.png) [@798419633](https://get-help.theconstruct.ai/u/798419633)\
**Post date:** [June 26, 2020, 8:06am UTC](https://get-help.theconstruct.ai/t/create-environment-for-python3/3022/3 "2020-06-26T08:06:45Z")

</div>

Although I have followed the live class ‘How to use ROS with Python3’ step by setp,  
after I have typed in ‘catkin\_make -DPYTHON\_EXECUTABLE:FILEPATH=/home/zxj/python3\_ws/py3venv/bin/python’.

I got this message:

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin\_workspace.cmake:95 (message):  
This workspace contains non-catkin packages in it, and catkin cannot build  
a non-homogeneous workspace without isolation. Try the  
‘catkin\_make\_isolated’ command instead.  
Call Stack (most recent call first):  
CMakeLists.txt:67 (catkin\_workspace)

– Configuring incomplete, errors occurred!  
See also “/home/zxj/python3\_ws/build/CMakeFiles/CMakeOutput.log”.  
See also “/home/zxj/python3\_ws/build/CMakeFiles/CMakeError.log”.  
Invoking “cmake” failed

And CMakeError.log 🙂collect2: error:  
ld returned 1 exit status  
CMakeFiles/cmTC\_3d131.dir/build.make:97: recipe for target ‘cmTC\_3d131’ failed  
make[1]: \*\*\* [cmTC\_3d131] Error 1  
make[1]: Leaving directory ‘/home/zxj/python3\_ws/build/CMakeFiles/CMakeTmp’  
Makefile:126: recipe for target ‘cmTC\_3d131/fast’ failed  
make: \*\*\* [cmTC\_3d131/fast] Error 2

I am very confused about the result.  
Would you like to tell me what’s wrong in that?  
Thank you!

---

<div class="post-metadata">

**Author:** ![Navid.Mellatshahi](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/navid.mellatshahi/32/10_2.png) [@Navid.Mellatshahi](https://get-help.theconstruct.ai/u/Navid.Mellatshahi)\
**Post date:** [July 16, 2020, 8:39pm UTC](https://get-help.theconstruct.ai/t/create-environment-for-python3/3022/4 "2020-07-16T20:39:09Z")

</div>

I also have same issue and wasn’t able to get it work. Please someone support.

---

<div class="post-metadata">

**Author:** ![caseyvsilver](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/caseyvsilver/32/5695_2.png) [@caseyvsilver](https://get-help.theconstruct.ai/u/caseyvsilver)\
**Post date:** [November 6, 2022, 1:04am UTC](https://get-help.theconstruct.ai/t/create-environment-for-python3/3022/5 "2022-11-06T01:04:49Z")

</div>

Was this ever resolved? I am taking the Tensorflow 101 course and i am getting errors following the code because the scripts are trying to run using python2.
