Duplicated entries in $PATH
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
I encounter similar problem as described in #2495 .
There are duplicated entries in $PATH when I launch Jupyter notebook.
For example, here is my $PATH variable in bash shell
`username@pc: /home/username/apps/anaconda3/bin:/bin:/usr/bin:/usr/local/bin` .
After launching Jupyter notebook, when I execute `!echo $PATH` in a notebook cell, I get the following:
``/home/username/apps/anaconda3/bin:/home/username/apps/anaconda3/bin:/bin:/usr/bin:/usr/local/bin`` .
The path variable `/home/username/apps/anaconda3/bin` is added twice in `$PATH`.
The problem exists even if the first entry is different, such as the following:
``/home/username/apps/anaconda3/bin:/some/random/path:/home/username/apps/anaconda3/bin:/bin:/usr/bin:/usr/local/bin`` .
I also encounter this problem in Windows. For instance, with Anaconda3 in Windows, I get the following when I execute `!echo %PATH%` in notebook shell,
``D:\Apps\Anaconda3\Library\bin;D:\Apps\Anaconda3\Library\bin;D:\Apps\Anaconda3\Scripts;D:\Apps\Anaconda3\Library\bin;D:\Apps\Anaconda3;`` .
The path variable `D:\Apps\Anaconda3\Library\bin` is added twice in Windows `%PATH%` variable.
Contributor guide
Research direction
Reproduce the issue by comparing the shell's PATH with `!echo $PATH` in a notebook cell, and repeat with `%PATH%` on Windows as described. Trace how the notebook launches shell commands and determine where entries are duplicated. Done means notebook shell commands preserve the environment without duplicate path entries on both platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook
- Domain
- backend, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100