Vitals:
- Windows 11
- conda = 24.5.0
- Miniconda 3
I have Miniconda 3 installed in my $HOME (\Users\my-name) directory and a conda environment–intended for JupyterLab dev-- installed (via Miniconda) under a project folder, also located in $HOME. I have conda-build installed in the base Miniconda, but I also have conda-build installed in the conda env (which I did before knowing that it is recommended that it be in the base environment only).
My issue: I want to install the PyPI package jupyterlab-hide-code (version 4.0.0) in my conda env (not base), but that package is only available on PyPI. So, with the conda env activated, I ran conda skeleton (tried grayskull, too) to build a recipe from the PyPI package. That created a .yaml recipe file in a jupyterlab-hide-code folder in my conda env. The top part of the .yaml file is as follows:
{% set name = “jupyterlab-hide-code” %}
{% set version = “4.0.0” %}
package:
name: “{{ name|lower }}”
version: “{{ version }}”
source:
url: “https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz”
sha256: ec049d886ba8ba77d5471a3dcd5f65b3e7fefc1b460da556d845568d32aebe3e
build:
number: 0
script: “{{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation”
requirements:
host:
- pip
- python
run:
- python
I then tried to use conda-build (which apparently ran from the base env) to create a conda package from that recipe; however, conda-build throws an error; the following three lines involve the retrieval of the python package from PyPI.
Downloading source to cache: jupyterlab-hide-code-4.0.0_ec049d886b.tar.gz
Downloading https://pypi.io/packages/source/j/jupyterlab-hide-code/jupyterlab-hide-code-4.0.0.tar.gz
WARNING: Error: HTTP 404 NOT FOUND for url https://pypi.io/packages/source/j/jupyterlab-hide-code/jupyterlab-hide-code
Conda skeleton certainly found the package on PyPI and the SHA256 hash matches that given in the file download section on PyPI. The package .tar file name is correct, too; however, something about the URL does not work. I tried pasting the URL from the .yaml file,
https://pypi.io/packages/source/j/jupyterlab-hide-code/jupyterlab-hide-code-4.00.tar.gz
into my browser, and the page is redirected to:
and it also says that the site cannot be reached. (We have been having intermittent network problems at my location.) I have been trying to accomplish this operation multiple times since yesterday morning, though, and always with the same result. So, I have these questions:
- Is there something actually wrong with the .yaml file, particularly with the URL?
- Might this be the result of running conda-build from the base environment? (I suspect so, to some extent at least.)
- If so, how do I force conda to use the conda-build in the conda env (not base)?
- Alternatively, can I use the conda-build in the base to build the recipe file in the conda env and put the resulting package in the conda env, say by somehow specifying the full path to the recipe?
- How do I safely get rid of the multiple recipe (.yaml) files and enclosing folders that I now have in various places in my directories: can I just delete them?
I am obviously a newbie at all of this, but I am at my wit’s end on this one at the moment. I REALLY need to have the functionality in the jupyter-hide-code package, and I do not yet possess the skills to create such a package for myself. (Working on it.) Thanks, all.