Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the kernel version for python??? #7450

Open
isaac-you opened this issue Nov 1, 2019 · 1 comment
Open

How to change the kernel version for python??? #7450

isaac-you opened this issue Nov 1, 2019 · 1 comment
Milestone

Comments

@isaac-you
Copy link

The basic anaconda install python3.6.5 for the system , And I use the jupyterLab 0.32.1 to get remote python kernel under ubuntu system.

But when I use the code :

conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

to install pytorch for the system
It automatically install python3.6.7 for pytorch

So I can just only use python in the terminal to import torch

(pytorch12) isaac@AIServer01:~$ python
Python 3.6.7 | packaged by conda-forge | (default, Jul  2 2019, 02:18:42) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> 

but It cannot work for ipython and jupyter kernel

(pytorch12) isaac@AIServer01:~$ ipython
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import torch
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-eb42ca6e4af3> in <module>()
----> 1 import torch

ModuleNotFoundError: No module named 'torch'

Because the ipython and jupyter still connect to python3.6.5
How can switch to python3.6.7 to use pytorch by jupyter ??
Thank you .

@jasongrout jasongrout added this to the Reference milestone Nov 4, 2019
@jasongrout
Copy link
Contributor

My guess is ipython is not being invoked from your environment, but from somewhere else. Try installing jupyterlab in your environment: conda install jupyterlab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants