# Chapter7:how to build venv(python3) on local PC?

**URL:** <https://get-help.theconstruct.ai/t/chapter7-how-to-build-venv-python3-on-local-pc/4184>\
**Category:** Using OpenAI With ROS\
**Tags:** python3\
**Created:** [June 26, 2020, 8:52am UTC](https://get-help.theconstruct.ai/t/chapter7-how-to-build-venv-python3-on-local-pc/4184 "2020-06-26T08:52:39Z")\
**Posts on this page:** 6\
**Page:** 1

<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:52am UTC](https://get-help.theconstruct.ai/t/chapter7-how-to-build-venv-python3-on-local-pc/4184/1 "2020-06-26T08:52:40Z")

</div>

I’m trying to build venv(python3) on my local PC to run the openai baseline.

[![](https://get-help.robotigniteacademy.com/uploads/default/original/2X/0/08b96d24a55a91559c6f0df8c19433eb0ed107d4.jpeg "ROS Developers LIVE Class #81: How to use ROS with Python3") ](https://www.youtube.com/watch?v=oxK4ykVh1EE)

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:** ![simon.steinmann91](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/simon.steinmann91/32/324_2.png) [@simon.steinmann91](https://get-help.theconstruct.ai/u/simon.steinmann91)\
**Post date:** [June 26, 2020, 2:46pm UTC](https://get-help.theconstruct.ai/t/chapter7-how-to-build-venv-python3-on-local-pc/4184/2 "2020-06-26T14:46:23Z")

</div>

@rtellez can you tak a look?

---

<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 27, 2020, 2:28pm UTC](https://get-help.theconstruct.ai/t/chapter7-how-to-build-venv-python3-on-local-pc/4184/3 "2020-06-27T14:28:31Z")

</div>

Hello, thanks for your attention. I still haven’t solved the problem.  
And Would you like to tell me that has anyone ever tried the openai\_ros package on the ROS Noetic?

---

<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 27, 2020, 2:38pm UTC](https://get-help.theconstruct.ai/t/chapter7-how-to-build-venv-python3-on-local-pc/4184/4 "2020-06-27T14:38:43Z")

</div>

sudo apt-get install python-catkin-tools python3-dev python3-numpy  
sudo pip install virtualenv  
mkdir -p python3\_ws/src  
cd python3\_ws  
virtualenv py3venv --python=python3  
source ~/python3\_ws/py3venv/bin/activate  
cd ~/python3\_ws/src/  
git clone [https://github.com/ros/geometry](https://github.com/ros/geometry)  
git clone [https://github.com/ros/geometry2](https://github.com/ros/geometry2)  
pip install pyaml rospkg empy catkin\_pkg numpy  
cd ~/python3\_ws  
catkin\_make -DPYTHON\_EXECUTABLE:FILEPATH=/home/zxj/python3\_ws/py3venv/bin/python

and then

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

---

<div class="post-metadata">

**Author:** ![commando4301](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/commando4301/32/10_2.png) [@commando4301](https://get-help.theconstruct.ai/u/commando4301)\
**Post date:** [September 5, 2020, 3:04pm UTC](https://get-help.theconstruct.ai/t/chapter7-how-to-build-venv-python3-on-local-pc/4184/5 "2020-09-05T15:04:02Z")

</div>

I am aslo having the same problem here, did you get any luck with it?

---

<div class="post-metadata">

**Author:** ![ncbdrck](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/n/7bcc69/32.png) [@ncbdrck](https://get-help.theconstruct.ai/u/ncbdrck)\
**Post date:** [June 17, 2021, 6:14pm UTC](https://get-help.theconstruct.ai/t/chapter7-how-to-build-venv-python3-on-local-pc/4184/6 "2021-06-17T18:14:50Z")

</div>

I think you need to install dependencies. try

```
cd ~/python3_ws/
rosdep install --from-paths src --ignore-src -r -y
catkin_make
source devel/setup.bash
```
