version discrepancy for numpy, astropy

Tanvi Deshmukh
  • 3 Aug '20


I am using the jupyter labs workspace, and when I use the terminal on jupyter labs to check the version of numpy, I see that the version is 1.19.1. However, when I open a notebook in jupyter labs and check the version of numpy, it is using an older version (1.13.3). Why are the two versions not consistent between the notebook and the terminal?

My main reason for this question is that I would like to use Astropy for some calculations, but it requires the notebook to be using numpy version 1.19.1. If anyone has used Astropy in a notebook on jupyter labs and is able to import the module successfully, help would be appreciated!

Thank you!

Dylan Nelson
  • 3 Aug '20

Hi Tanvi,

Personally, I had numpy 1.18.1 on my JupyterLab environment. I upgraded with

pip install --user --upgrade numpy

and this successfully installed numpy 1.19.1 into my home directory. If I open a new Notebook, with Python 3 kernel, I also see this version reported

import numpy

Perhaps you installed/upgraded numpy into a strange location? Does the above work?

  • Page 1 of 1