anaconda / nb_conda_kernels

Package for managing conda environment-based kernels inside of Jupyter
BSD 3-Clause "New" or "Revised" License
599 stars 70 forks source link

Lowercase Paths during Lookup #218

Closed hakasapl closed 8 months ago

hakasapl commented 2 years ago

Hi All,

I came across an issue where any conda environments with uppercase characters were not able to start a kernel in Jupyter. Eventually I found out that it is due to nb_conda_kernels is making the path lowercase. In manager.py, line 218:

kernel_dir = dirname(spec_path).lower()

When I manually remove the .lower() portion - things start working as expected. Because I am on a case-sensitive OS as part of a HPC cluster (Ubuntu Linux), I was confused to find this.

Is nb_conda_kernels intended to be only used on Windows or other case-insensitive systems? Either way, even in a case-insensitive OS, mismatched uppercase/lowercase chars shouldn't stop the application from working. Is this something that should be removed? Happy to submit a PR if so, but it feels like I'm missing something so I'll wait for now.

danykaufman commented 2 years ago

Same here. Removing the .lower() portion fixes linux functionality when path contains uppercase letters.