0

update 2020-04-13 @ 0915 Central: Sorry for the delay in responding, got pulled off on some other work stuff.

But I'm still having the issue. In both my base and py37 environments. I wrote tiny script:

import pandas as pd
print("Current Pandas version is {}".format(pd.__version__)

I ran it and conda list | grep "pandas" from the command line with the following output:

(base) C:\Users\Public\Documents>conda list | grep "pandas"
pandas                    1.0.3            py37h9b59f54_0    conda-forge

(base) C:\Users\Public\Documents>python pandas_version.py
Current version of Pandas is 0.25.0rc0

(base) C:\Users\Public\Documents>activate py37

(py37) C:\Users\Public\Documents>conda list | grep "pandas"
pandas                    1.0.3            py37h9b59f54_0    conda-forge
pandas-profiling          2.4.0                      py_1    conda-forge

(py37) C:\Users\Public\Documents>python pandas_version.py
Current version of Pandas is 0.25.0rc0

(py37) C:\Users\Public\Documents>

I'm correct in that these version should match right? Am I doing something wrong?

I built the py37 environment by running:

conda create -n py37 python=3.7 ipykernel pandas

----Original Post Follows----

I'm using Anaconda on a Microsoft DSVM and I have a discrepancy between the command line version

conda list

shows:

pandas                    1.0.3            py37h9b59f54_0    conda-forge

However, in my Jupyter Notebook I see version 0.25.0rc0

pd.__version__
'0.25.0rc0'

Perhaps I'm just missing something, but one of my co-workers wrote a script I'm trying to use and it seems some functionality is missing because I'm on an older version of the Pandas package.

Is it normal for the version on the command line to not match that within a notebook? I'm in the same environment for both.

Ben A
  • 199
  • 2
  • 3
  • 13

1 Answers1

0

You are not in the same environment in the jupyter notebook. No big deal, just check the following steps:

(1) You need to add a new kernel to your environment as described in this SO post. In Anaconda Prompt type:

conda activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"

(2) Make sure that you start the Jupyter notebook kernel in your environment.

conda activate myenv
cd <my_working_path>
jupyter notebook

(3) In juypter notebook select the the kernel of your environment (it is the display-name set in step 1).

Change kernel

above_c_level
  • 3,579
  • 3
  • 22
  • 37