简体   繁体   中英

how to change numpy version with miniforge

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM