• Conda create with python version fails me

    From Martin Schöön@3:633/10 to All on Thu Nov 13 10:26:49 2025
    About two years ago I moved from pip to conda. I have been happy with
    conda until yesterday.

    I want to create a new environment using a specific python version
    rather than leaving that to conda. Cheat-sheets and online conda
    documentation tell me to use:

    conda create -n <name> python=<version number>

    like:

    conda create -n test python=3.10

    Which in my case yields an error message saying python 3.10 is not
    available in this environment.

    I have tried variations on the python specification:

    python==3.10.12
    python=3.10.12

    To no avail.

    I think (!??!) I have managed to do this in the past.

    Any help is more than welcome.

    /Martin

    --- PyGate Linux v1.5
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Loris Bennett@3:633/10 to All on Thu Nov 13 11:40:18 2025
    Hi Martin,

    Martin Sch””n <martin.schoon@gmail.com> writes:

    About two years ago I moved from pip to conda. I have been happy with
    conda until yesterday.

    I want to create a new environment using a specific python version
    rather than leaving that to conda. Cheat-sheets and online conda documentation tell me to use:

    conda create -n <name> python=<version number>

    like:

    conda create -n test python=3.10

    Which in my case yields an error message saying python 3.10 is not
    available in this environment.

    I have tried variations on the python specification:

    python==3.10.12
    python=3.10.12

    To no avail.

    I think (!??!) I have managed to do this in the past.

    Any help is more than welcome.

    /Martin

    If I use an environment which provides Python 3.12 I can run both

    conda create -n test python=3.10

    and

    conda create -n test python=3.14

    I only get the error

    PackagesNotFoundError: The following packages are not available from current channels:

    if I do something I would expect to fail, like

    conda create -n test python=3.99

    Do you see a line such as

    Collecting package metadata (repodata.json): done

    If not, maybe your repodata.json is not getting updated and the current
    one does not contain the Python version you are requesting.

    Regards

    Loris

    --
    This signature is currently under constuction.

    --- PyGate Linux v1.5
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Martin Schöön@3:633/10 to All on Fri Nov 14 15:46:53 2025
    Den 2025-11-13 skrev Loris Bennett <loris.bennett@fu-berlin.de>:
    Hi Loris,

    Thanks for quick respons.

    Martin Sch””n <martin.schoon@gmail.com> writes:


    I want to create a new environment using a specific python version
    rather than leaving that to conda. Cheat-sheets and online conda
    documentation tell me to use:

    conda create -n <name> python=<version number>

    like:

    conda create -n test python=3.10

    Which in my case yields an error message saying python 3.10 is not
    available in this environment.

    I have tried variations on the python specification:

    python==3.10.12
    python=3.10.12

    To no avail.


    If I use an environment which provides Python 3.12 I can run both

    conda create -n test python=3.10

    and

    conda create -n test python=3.14

    I only get the error

    PackagesNotFoundError: The following packages are not available from current channels:

    if I do something I would expect to fail, like

    conda create -n test python=3.99

    Do you see a line such as

    Collecting package metadata (repodata.json): done

    If not, maybe your repodata.json is not getting updated and the current
    one does not contain the Python version you are requesting.

    Regards

    Loris

    I have now run a series of tests on my main system running Debian 12 and
    in a virtual machine updated to Debian 13. I get the same result in both
    cases.

    If I don't specify a python version all is fine.

    If I try to specify a python version I don't get a new environment. The
    error message I get is:

    "The following packages are missing from the target environment:

    - python=3.10"

    (if I asked for version 3.10)

    Some observations:

    Myself, I can't find repodata.json. Not in my user directories at
    least. Conda reports it can collect metadata anyway.

    The main system has base python version 3.12.12 and the environment I
    get if I don't specify a python version is equipped with version 3.11.2

    In the virtual machine the base python is 3.11.5 and the created
    environment gets 3.13.5

    The last two ones look odd to me but that is what python3 --version
    yields.

    /Martin

    --- PyGate Linux v1.5
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Martin Schöön@3:633/10 to All on Mon Nov 17 22:14:20 2025
    Den 2025-11-14 skrev Stefan Ram <ram@zedat.fu-berlin.de>:
    Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= <martin.schoon@gmail.com> wrote or quoted:
    If I try to specify a python version I don't get a new environment. The >>error message I get is:
    "The following packages are missing from the target environment:
    - python=3.10"
    (if I asked for version 3.10)

    I'm not educated in Conda. But here are some wild and untested
    guesses what could be done:

    Your conda know-how is most likely superior to mine :-)

    conda search python

    This might list the Python versions available.

    Yields an error message very similar to the one cited above.

    If the desired version does not appear, adding a channel known
    to host older versions might help, like:

    conda create -n test python=3.10 -c conda-forge

    Bingo! This works for me.

    . It might help to update Conda:

    conda update conda

    Was already up-to-date.

    Didn't bother testing the following. Later maybe.

    . This should clear the Conda cache, but I don't know what you might
    lose by doing it:

    conda clean --all

    . Check out your conda base and user PATH variables, and prioritize
    Conda environments over system-wide Python installations.

    Check your system's networking/firewall configuration doesn't block
    Conda's access to remote repositories.

    You could also try to require a more specific version you have,
    like for example, "python=3.10.4", instead of, "python=3.10".

    Many thanks.

    /Martin

    --- PyGate Linux v1.5
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)