About specifying the Python path in a ROS2 config file

Open
#497 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Start by reviewing how ROS2 CLI tools select the interpreter from the first line of each .py script and read the linked ROS2 issue 525 for the reported problem. Compare that behavior with the proposed YAML configuration containing PythonPath. Done would require an agreed configuration location, precedence, format, and validation approach, none of which this issue currently specifies.

Written by the indexing model from the issue text.

Description

more-information-needed question

Feature request

I want to specify the Python path in a ROS2 config file, so that the issues like https://github.com/ros2/ros2/issues/525 would not happen.

Feature description

I saw that in ROS2, the Python interpreter is specified by the first line in the .py script, like
#!c:\python37\python.exe.
So there is a assumption that everyone would install the Python according to the installation instructions, which means some developers like me cannot use a installed Python distribution, like Anaconda.

Implementation considerations

I think ROS2 could use a config file for us to specify the Python path, in maybe a .yamlfile, like:
PythonPath = C:\Python37\

Dominant language
Python
Stars
274
Forks
246
Avg merge
1d 14h
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ros2/ros2cli

All issues in ros2/ros2cli

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.