2

My current anaconda only has python 3.8 and 3.9.

python                         3.8.5 h05baefb_8_cpython  conda-forge         
python                         3.8.6 h12cc5a1_1_cpython  conda-forge         
python                         3.8.6 h12cc5a1_2_cpython  conda-forge         
python                         3.8.6 h12cc5a1_3_cpython  conda-forge         
python                         3.8.6 h12cc5a1_4_cpython  conda-forge         
python                         3.8.6 h12cc5a1_5_cpython  conda-forge         
python                         3.8.6 h3098bc4_0_cpython  conda-forge         
python                         3.8.8 h12cc5a1_0_cpython  conda-forge         
python                         3.9.0 h4b4120c_5_cpython  conda-forge         
python                         3.9.0 hd001b3a_0_cpython  conda-forge         
python                         3.9.0 hd001b3a_1_cpython  conda-forge         
python                         3.9.0 hd001b3a_2_cpython  conda-forge         
python                         3.9.0 hd001b3a_3_cpython  conda-forge         
python                         3.9.0 hf1b0709_4_cpython  conda-forge         
python                      3.9.1rc1 h4b4120c_0_cpython  conda-forge         
python                      3.9.1rc1 h4b4120c_1_cpython  conda-forge         
python                         3.9.1 h4b4120c_0_cpython  conda-forge         
python                         3.9.1 hcbd9b3a_1_cpython  conda-forge         
python                         3.9.1 hcbd9b3a_2_cpython  conda-forge         
python                         3.9.1 hcbd9b3a_3_cpython  conda-forge         
python                         3.9.1 hcbd9b3a_4_cpython  conda-forge         
python                         3.9.1 hcbd9b3a_5_cpython  conda-forge         
python                         3.9.2 hcbd9b3a_0_cpython  conda-forge

This is what it output when I enter conda search --full-name python

Now I want to install tensorflowjs but for that I need tensorflow, but pip install tensorflow gives me this error ERROR: Could not find a version that satisfies the requirement tensorflow ERROR: No matching distribution found for tensorflow

My python version is 3.8.8 in my virtual environment but I think I need to be in a lower version, but when try to install python 3.7 using conda install -c anaconda python=3.7 it gives me this


  - python=3.7

Current channels:

  - https://conda.anaconda.org/anaconda/osx-arm64
  - https://conda.anaconda.org/anaconda/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/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 have no idea how to get python 3.7 in my conda, please help!

alborzdev
  • 55
  • 1
  • 6

3 Answers3

2

As merv pointed out in his comment:

OP is on osx-arm64 platform. There are only Python v3.8 and v3.9 builds for that.

When you type conda search python in your terminal, you will see that the Conda-forge channel only supports Python versions down until 3.8.5.

This article shows how to install older versions using miniconda. You can try that.

Philipp
  • 652
  • 2
  • 10
  • 28
0

So I fixed the problem... I deleted Anaconda completely from my mac using https://nektony.com/mac-app-cleaner, my channels were completely broken but now I can use previous Python version. Also the reason why I think they were broken was because I did follow a tutorial on installing the tensorflow fork for M1 Macs, that might've broken something.

alborzdev
  • 55
  • 1
  • 6
-2

Try

conda create -n "testenv" python=3.7 -c conda-forge

this works for me with conda version 4.9.2.

For info, conda-forge can sometimes provides alternatives when conda becomes limited.

Yuki
  • 59
  • 6
  • Thanks for the suggestion! I tried what you said and it sadly gave me the exact same output of "PackagesNotFoundError: The following packages are not available from current channels:" (same as in my question). I'm also on conda verison 4.9.2 so no idea why this won't work :( For some reason my channels just don't allow me to choose python 3.7 – alborzdev Mar 12 '21 at 21:28
  • This is probably because conda-forge is not added to your channels. Run `conda config --append channels conda-forge` then try the command again. – Yuki Mar 12 '21 at 21:39
  • Just tried that and it said "Warning: 'conda-forge' already in 'channels' list, moving to the bottom", so I think I already have it, ran your line again and it gave me the same problem. In your anaconda navigator when you go to the environments tab and create a new environment, does the python version include 3.7? Mine only has the option for 3.8, and I can't even install 3.7 apparently. – alborzdev Mar 12 '21 at 21:43
  • When I listed all available versions I also didn't get version 3.7 before. Try restoring free channels searching by prepending the following to the install command `CONDA_RESTORE_FREE_CHANNEL=1` ... I assume you are on a *nix system. If on Windows I believe it's `SET CONDA_RESTORE_FREE_CHANNEL=1` and then rerun install command. If you want to only try this on a single environment try: `conda config --env --set restore_free_channel true` – Yuki Mar 12 '21 at 21:49
  • If the above also doesn't work, then please output the results of: `conda config --show channels` – Yuki Mar 12 '21 at 21:58
  • So i'm in a conda environment right now and I ran the line "conda config --env --set restore_free_channel true", you said prepend it to the install command but I'm not exactly sure which install command you are talking about. I just ran the line and tried the same things I've tried before and its giving me the same error, could you clarify further sorry (I'm on mac btw) – alborzdev Mar 12 '21 at 22:02
  • "conda config --show channels" channels: - defaults - conda-forge – alborzdev Mar 12 '21 at 22:22
  • 1
    It's not a free channel issue. OP is on **osx-arm64** platform. There are only Python v3.8 and v3.9 builds for that. – merv Mar 13 '21 at 04:01