Jupyter4Science / jupyterlab-ide

JupyterLab + tab completion + debugger + linter = Fully-fleged IDE
MIT License
3 stars 0 forks source link

Problems with installing from environment.yml #64

Closed Dcosthephalump closed 8 months ago

Dcosthephalump commented 1 year ago

I have found with work on the Vim, Variable Inspector, and Code Formatter notebook tutorials that there are some problems with environment.yml that should be kept in mind for the future. This also collects some previously mentioned issues

1: Vim

This is a summary of #55

For some reason, jupyterlab-vim does not install with the rest of the environment when first creating the environment. That is to say, when you run:

conda env create -f binder/environment.yml

from the jupyterlab-ide directory, the Vim extension is not available. However, if you use:

conda install -c conda-forge jupyterlab_vim

after installation to add the extension to the environment, it will install with no problems.

2: krinsman channel

Copying the text of #56:

In the environment.yml, we have:

krinsman # jupyterlab_html

as a channel option. Jupyterlab-html seems to be an artifact from an earlier state of the repository where jupyterlab-html was still a part of the environment. It appears that it is now part of the base functionality of JupyterLab.

Should this channel be removed?

3: Including pip in the environment.yml

From this tutorial, while it is not always best to use pip, I have started to agree with the idea that pip should be included in the environment.yml as a best practice. I think it comes with Python, so I'm not too worried about it being explicitly laid out. More what I'm worried about is the use of pip for installing certain packages. Specifically, code formatter and the code formatters black, yapf, autopep8, and isort have not installed on my system correctly without using pip. I have included those in my local version of environment.yml (which is something of a mess right now) as packages which pip will install and it has installed without any issues.

Should this be pushed to the main environment.yml?

[For testing, I should probably see if the Vim extension installs out of the box if installed using pip in environment.yml]

4: Including standard libraries?

I discovered when working on Variable Inspector that installing the numpy and pandas library into the jupyterlab-ide environment after first creating it from environment.yml was only possible using pip. Using conda was not effective for this purpose and it took a lot more time than I would have liked for conda to search through channels and check for conflicts before throwing up an error message and failing the install. There are two solutions that worked for me:

1) Install numpy and pandas into the environment with pip 2) Include numpy and pandas in environment.yml and install the environment from scratch

Because these are standard libraries and the goal of this repository is to provide a platform to work from, should we include these libraries (and others) as standard libraries in environment.yml? If not, is there a good way to document this that is visible to users of the repository that doesn't clutter the repository? Maybe a KNOWN_BUGS.md or some such thing?

Dcosthephalump commented 1 year ago

5: Removing Variable Inspector

Given how buggy that the variable inspector extension has been, should that be removed?