Skip to content

📝 Explicitely state that PYTHONPATH should be manually updated in ros2 virtual environments #5974

@MichalisPapadakis

Description

@MichalisPapadakis

Issue Type

  • 🐛 Bug / Problem
  • ✏️ Typo / Grammar
  • 📖 Outdated Content
  • 🚀 Enhancement

Generated by Generative AI

No response

Distribution

No response

Description

In the tutorial for using Python Packages with ROS 2, it is mentioned how to install python modules via a virtual environment, but the info is not compete regarding what it is required to actually run the nodes in the packages that depend on these modules.

Personally, I have to manually update the PYTHONPATH environmental variable (or update the .bashrc) to include the modules of the virtual environment using

export PYTHONPATH=$PYTHONPATH:<path2venv>/lib/<venv-python-version>/site-packages

or update the python path in the launch file prior to launching the corresponding nodes.

If I am not using the virtual environments in a way that is not intended, I believe the detail should be mentioned.

Affected Pages/Sections

No response

Screenshots or Examples (if applicable)

No response

Suggested Fix

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions