I once downloaded tools (Python 2, Visual Studio, Virtual Box, etc.) however now have my jupyter notebook and any other notebook I use default to the old/original version of python & anaconda that I had initially installed.
I already tried removing and uninstalling any old downloads/versions and I updated everything in my terminal including my notebook using:
python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\programdata\anaconda3\lib\site-packages (20.0.2)
However my notebook still tells me the following:
You are using pip version 9.0.1, however version 20.0.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
The same happens when I try installing the latest version of seaborn (to help visualize and chart with matplotlib) via the terminal. When I check which is the latest version I have in my terminal, it shows the following:
$ pip show seaborn
Name: seaborn
Version: 0.10.0
Summary: seaborn: statistical data visualization
...
Location: c:\programdata\anaconda3\lib\site-packages
Requires: scipy, matplotlib, pandas, numpy
However, when I print/check in my notebook it reads:
import seaborn as sns
sns.__version__
0.7.1
Lastly, when I run the following code in my notebook it reads:
import sys
sys.version
3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)]
I checked to see the executable location for Python in my Jupyter notebook and got back the following:
sys.executable
C:\\Users\\myusername\\.conda\\envs\\PythonData\\python.exe'
and I checked to see the available kernels for Jupyter in my terminal:
$jupyter kernelspec list
Available kernels:
>python3 C:\ProgramData\Anaconda3\share\jupyter\kernels\python3
Based on the example below, I believe the executable location for my notebook(s) defaults to an older version of Python2 that was initially downloaded.
For Python2:
$ python
import sys
print sys.executable
The output is: /usr/bin/python
For Python3:
$ python3
import sys
print (sys.executable)
The output is: /usr/bin/python3
I know I can wipe out my computer and install everything from scratch but that is not ideal for me.