anaconda command line switch working directory

Project scenario: anaconda prompt starts the default %HOME%

The anaconda virtual environment is installed on the D drive. anaconda promptWhen starting the command line mode, the default working directory is: c:\User\Administrator. The source code installation package or code file is usually not in the C drive, so running the program through the command line will require you to switch to this working path.
insert image description here
However, commands to switch to other disks, such as cd E:\, do not take effect.


Solution: Modify the start path of anaconda prompt

The specific solution is as follows:

Step 1: Open the Windows start menu, find anaconda prompt, right-click, and open the file location.
insert image description here
Step 2: Right-click Anaconda Prompt (Anaconda3)the shortcut, click Properties, and modify it 起始位置to the working directory you want to switch.
insert image description here
Restart anaconda promptthe command mode and switch to this path.
insert image description here

Guess you like

Origin blog.csdn.net/beauthy/article/details/124098594