how to change python version in jupyter notebook
- User
how to change python version in jupyter notebook
Assistant
Here are a few ways to change the Python version used in Jupyter Notebook:
-
Install the version of Python you want to use and make sure it is on your PATH. Jupyter will use the first Python executable it finds on your PATH.
-
Create a new conda or virtualenv environment with the desired Python version and install Jupyter in it. Launch Jupyter from within the environment to use that Python version.
-
Use a kernelspec to specify the Python version. Create a kernelspec json file like:
{ "argv": ["/path/to/python3.7", "-m", "ipykernel_launcher", "-f", "{connection_file}"], "display_name": "Python 3.7", "language": "python" }-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.