Here is the blogger’s first blog post, the purpose of the blog is to record some daily problems and solutions.

Let’s begin the main topic of this article.

I am now in my junior year of undergraduate study, and I am starting a project about deep learning. The current environment is based on the pytorch framework of python3.7, and idle uses the popular jupyter notebook on the Internet.

Since the anaconda framework is not installed, you need to change the file path from CMD and enter code to start the notebook every time, which is too tedious, so you want to use a simple code instead.

import os
os.chdir(r'E:\\python_files')
os.popen('jupyter notebook')
Copy the code

Here the OS library is called for Python to interact with CMD. Os.chdir () is responsible for changing the current path, and os.popen() is responsible for actually running the notebook.