How to change python version of Notebook in Watson Studio (or Cloud Pak for Data)

I used to run Watson Studio's Notebook on Python 3.6, but recently I got a message saying "Python 3.6 is no longer recommended, so change the environment to Python 3.7". This article describes how to change the version of the Watson Studio (or Cloud Pak for Data) Notebook Python environment.

image.png

Method 1: Open Notebook in edit mode and modify

1. Open Notebook in edit mode

Click the pencil (edit) icon on the notebook for which you want to change the Python version. image.png

2. Click the i mark (display notebook information) icon in the upper right

Click the icon with the i in the upper right corner: image.png

3. Click the "Environment" tab in the displayed information area

The information will be displayed on the right, click on the Environment tab in it: image.png

4. Click to select the environment you want to change from the "Environment Definition" dropdown.

This time I want to change to Python 3.7, so select the same XS as it is now in Python 3.7. Click the environment definition dropdown: image.png

Select from the drop-down list: image.png

5. When the confirmation "Do you want to change the environment?" Is displayed, click "Change environment".

Check the contents and click "Change Environment". image.png

After that, the screen will be displayed for a while. image.png

image.png

You've successfully completed Python 3.7! image.png

Method 2: Change from action on asset page

1: Open the project, click the action menu (vertical ...) of the file you want to change in the Notebooks section of the Assets tab,

Click "Change Environment".

If it is locked or the kernel is running, the "Change environment" menu will not appear, so unlock it and click "Stop kernel" from the file action menu (vertical ...). Please stop and then go.

image.png

2: Select the runtime to run Notebook and click "Associate"

Select the runtime that runs your notebook from the drop-down list and click Associate:

image.png

I think it has changed for the time being, but the display is still Python 3.6. image.png

It seems to change when booting the kernel after that. Click the pencil (edit) icon.

It was changed safely! :: image.png

When I then go to the Notebooks section of the Assets tab, it says Python 3.7: image.png

Summary

I introduced two methods. Either is easy. But it may be troublesome if there are many things to change ... that's all.

Recommended Posts

How to change python version of Notebook in Watson Studio (or Cloud Pak for Data)
Save pandas data in Excel format to data assets with Cloud Pak for Data (Watson Studio)
How to change Python version
How to change the log level of Azure SDK for Python
Output log file with Job (Notebook) of Cloud Pak for Data
How to update the python version of Cloud Shell on GCP
How to check opencv version in python
How to switch python versions in cloud9
How to use "deque" for Python data
How to send a visualization image of data created in Python to Typetalk
[Python] How to change character string (str) data to date (strptime of datetime)
Eliminate garbled Japanese characters in matplotlib graphs in Cloud Pak for Data Notebook
How to format a list of dictionaries (or instances) well in Python
[Python --open3d] How to convert obj data of 3D model to point cloud
Cloud Pak for Data object operation example in Python (WML client, project_lib)
Summary of how to import files in Python 3
Summary of how to use MNIST in Python
How to specify TLS version in python requests
Data analysis in Python Summary of sources to look at first for beginners
[Introduction to Python] How to get the index of data with a for statement
[For beginners] How to use say command in python!
Summary of tools needed to analyze data in Python
How to get the number of digits in Python
[For beginners] How to study Python3 data analysis exam
How to measure processing time in Python or Java
How to run python in virtual space (for MacOS)
[Work efficiency] How to change file names in Python
[Python] Change the Cache-Control of the object uploaded to Cloud Storage
How to debug the Python standard library in Visual Studio
How to save memory when reading huge XML of several GB or more in Python
How to generate exponential pulse time series data in python
How to define multiple variables in a python for statement
[Question] How to get data of textarea data in real time using Python web framework bottle
How to develop in a virtual environment of Python [Memo]
How to specify Cache-Control for blob storage in Azure Storage in Python
How to calculate the sum or average of time series csv data in an instant
Comparison of how to use higher-order functions in Python 2 and 3
How to implement Python EXE for Windows in Docker container
How to get a list of built-in exceptions in python
[Python] How to change EXCEL file saved in xlsb to xlsx
How to develop in Python
How to get an overview of your data in Pandas
Data science companion in python, how to specify elements in pandas
Let's use Watson from Python! --How to use Developer Cloud Python SDK
How to find the cumulative sum / sum for each group using DataFrame in Spark [Python version]
How to pass the execution result of a shell command in a list in Python (non-blocking version)
Put the process to sleep for a certain period of time (seconds) or more in Python
[Python] How to use the for statement. A method of extracting by specifying a range or conditions.
How to determine the existence of a selenium element in Python
How to install OpenCV on Cloud9 and run it in Python
[GCP] How to publish Cloud Storage signed URLs (temporary URLs) in Python
How to know the internal structure of an object in Python
How to make a string into an array or an array into a string in Python
How to change the color of just the button pressed in Tkinter
How to check the memory size of a variable in Python
How to configure CORS settings for Azure storage service in Python
Feel free to change the label of the legend in Seaborn in python
How to avoid duplication of data when inputting from Python to SQLite.
[Introduction to Python] How to use the in operator in a for statement?
How to check the memory size of a dictionary in Python
[For beginners] How to register a library created in Python in PyPI