how to change numpy version with miniforge

Viewed 179

I have installed miniforge on my mac , in that using a 'local env' on jupyter notebook. I can't change the numpy version (need to downgrade to 1.19.5) on this kernel, have tried: (1)pip install numpy==1.19.5 & (2)conda install -c conda-forge numpy=1.19.5.

numpy version seems to be changing easily on conda-ipython3 kernel, but my project is running on 'local env'

very new to all this, still learning. Please help

2 Answers

first make sure that your local environment is activated by running: .../{your venv folder path}/Scripts/activate. Because if you install numpy on the wrong virtual environment then it won't work. Then uninstall numpy by running pip uninstall numpy. Then install the numpy version you want.

You can do the following to ensure you have desired numpy version:

  1. Activate your local environment
  2. Uninstall any previously installed numpy version by using:
pip uninstall numpy
  1. Install the desired numpy version:
pip install numpy=1.19.5
  1. Check the installed version of numpy:
pip freeze

If you want to export the package list use:

pip freeze > requirements.txt
Related