Describe the bug
On Windows, using the Isaac Sim 6.0.1 pre-built binaries, I created a new Isaac Lab (v3.0.0-beta2.patch1) project using isaaclab.bat --new. Following the VS Code setup guide for the pre-built Isaac Sim binaries, I then ran the setup_python_env task. The task generated the .vscode/settings.json file (as intended), but I noticed that the included python.analysis.extraPaths setting conflicts with the pyproject.toml files (one at the root, one at source/{project_name}) that come with the generated project by default:
'python.analysis.extraPaths' cannot be set when a pyrightconfig.json or pyproject.toml is being used.
Therefore, the isaaclab imports cannot be resolved. Consequently, there is no autocompletion or docstrings displayed. This makes writing and testing the Python code in the project fairly difficult.
There are several related issues; Someone else already reported this specific issue: #629 (comment)
Steps to reproduce
- Create a new Isaac Lab project (
v3.0.0-beta2.patch1) using the built-in project generator (I created a manager-based workflow with rl_games).
- Open the project's folder in VS Code as root and run the
setup_python_env task.
- Enable Pylance. Then open the generated .vscode/settings.json file. Observe that the above mentioned error message will be reported.
- Open any Python script that contains
isaaclab imports in the project, for example the task's env config file at source/{project_name}, e.g. source/{project_name}/{project_name}/tasks/manager_based/{task_name}/{task_name}_env_cfg.py. In that file, see that the pre-defined imports from isaaclab.assets, from isaaclab.envs and from isaaclab.managers won't be recognized.
Additional context
- I have checked that the relative
extraPaths were correctly set; yes, they were. Also, in VS Code, the Python interpreter was correctly set to the Isaac Sim pre-built binaries dir's Python.
- I have tried to move the
extraPaths setting from settings.json to both pyproject.toml files. That involved some changes in the formatting (i.e., extraPaths = [...], removing ${workspaceFolder}/, and relative paths), but this didn't work either.
- Idk if this related, but right now, the pre-built binaries of Isaac Sim do not export an
PYTHONPATH env variable, see Where is setup_conda_env.sh in isaac sim 6.0? #6222.
- I have also tried deleting the settings.json file (it only works for the pre-built binaries, as described in the guide) and set up a conda env with the the latest
isaaclab pip release (v3.0.0-beta2.patch1). With the conda environment, isaaclab was recognized, but not its extra modules (e.g., from isaaclab.assets).
Question:
- Is there any way to make the
isaaclab extra modules work with Pylance (or Pyright) - either by pre-built binaries or pip - so that features like autocompletion and docstring information are available?
System Info
- Commit: ffff603
- Isaac Sim Version: 6.0.1
- OS: Windows 11
- GPU: RTX 3080 Ti
- CUDA: 13.3.1
- GPU Driver: 581.42
Checklist
Describe the bug
On Windows, using the Isaac Sim 6.0.1 pre-built binaries, I created a new Isaac Lab (
v3.0.0-beta2.patch1) project usingisaaclab.bat --new. Following the VS Code setup guide for the pre-built Isaac Sim binaries, I then ran thesetup_python_envtask. The task generated the .vscode/settings.json file (as intended), but I noticed that the includedpython.analysis.extraPathssetting conflicts with thepyproject.tomlfiles (one at the root, one atsource/{project_name}) that come with the generated project by default:Therefore, the
isaaclabimports cannot be resolved. Consequently, there is no autocompletion or docstrings displayed. This makes writing and testing the Python code in the project fairly difficult.There are several related issues; Someone else already reported this specific issue: #629 (comment)
Steps to reproduce
v3.0.0-beta2.patch1) using the built-in project generator (I created a manager-based workflow withrl_games).setup_python_envtask.isaaclabimports in the project, for example the task's env config file atsource/{project_name}, e.g.source/{project_name}/{project_name}/tasks/manager_based/{task_name}/{task_name}_env_cfg.py. In that file, see that the pre-defined importsfrom isaaclab.assets,from isaaclab.envsandfrom isaaclab.managerswon't be recognized.Additional context
extraPathswere correctly set; yes, they were. Also, in VS Code, the Python interpreter was correctly set to the Isaac Sim pre-built binaries dir's Python.extraPathssetting from settings.json to bothpyproject.tomlfiles. That involved some changes in the formatting (i.e.,extraPaths = [...], removing${workspaceFolder}/, and relative paths), but this didn't work either.PYTHONPATHenv variable, see Where is setup_conda_env.sh in isaac sim 6.0? #6222.isaaclabpip release (v3.0.0-beta2.patch1). With the conda environment,isaaclabwas recognized, but not its extra modules (e.g.,from isaaclab.assets).Question:
isaaclabextra modules work with Pylance (or Pyright) - either by pre-built binaries or pip - so that features like autocompletion and docstring information are available?System Info
Checklist