Issue
When I run !python -V
, in jupyterlab I have Python 3.8.13
When I run !py -V
, also in jupyter I have this time Python 3.10.7
When I run python -V
and py -V
in Powershell I have Python 3.10.7
When I run
import sys
print(sys.executable)
print(sys.version)
print(sys.version_info)
I have 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] sys.version_info(major=3, minor=10, micro=7, releaselevel='final', serial=0)
Could you tell me why the first one is different from the others?
I think it has to be an issue with conda version but I don't know where it comes from.
Thanks
Solution
JupyterLab is launched from your Conda environment that has Python 3.8.13 installed in it. This is the actual Python version you are running in jupyterlab, and the same version is shown when you type !python -V
.
You also have a separate non-Conda Python 3.10.7 installation on your system. The py
command is installed with this Python and is a Python launcher on Windows that works with non-Conda Python installations. The rest of the commands you tried on PowerShell are all outside jupyterlab and use the non-Conda Python version, which is 3.10.7.
Answered By - H4iku
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.