Working with Python version 3.9.13 in conda and VS Code

Question:

I am trying to create a new conda environment in VSCode. I am currently running Python version 3.9.13. Whenever I run the command conda create -n <environment name> python=3.9.13 anaconda I get the below message:

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.

'https//repo.anaconda.com/pkgs/main/win-64'

Whenever I retry I get the same message and anaconda.com is not blocked on my computer.

I tried running this same command in Anaconda Prompt and I get the following message:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

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

  - python=3.9.13

Current channels:

  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

I believe it’s because Python 3.9.13 is not running in conda yet. Are there any workarounds?

Asked By: pops101

||

Answers:

the latest version of Python 3.9 in conda is 3.9.12. This is also something you can figure out by releasing you version constraint from 3.9.13 to simply 3.9. Conda will always install the latest version as far as that is possible considering the other dependencies of the python environment.

Answered By: Pieter Geelen
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.