[Target Detection Experiment Series] To solve the Pycharm terminal (terminal) remote connection server (AutoDL), Chinese garbled characters appear and how to select the conda environment of the server configuration locally (very detailed, easy to ignore)

1. Main content of the article

       This blog mainly involves two main contents. The first one : Pycharm connects to the AutoDL server locally, and its terminal Chinese garbled solution. The second : How to choose the custom created AutoDL server conda environment to keep the local and server environments consistent (it takes about 5 minutes to read through this blog ).
       The main content of this blog reference comes from :
       sere, running your own code on the Autodl server lacks the required packages and the solution to displaying Chinese garbled characters

2. Pycharm local connection server terminal Chinese garbled characters

       The blogger uses the server on the official website of AutoDL, and opens an SSH Terminal terminal in Start SSH, and the displayed Chinese fonts are garbled characters ; the solution is to find the SSH Terminal terminal instead of the local Console terminal ; through the navigation window, enter File -> Tools -> SSH Terminal , change the Default encoding to UTF-8 , as shown in the figure below:
insert image description here

3. Select the server to customize the conda environment

       The environment used by the blogger on the AutoDL server is miniconda3, and then he created his own conda environment and named it yolo. Switching to the yolo environment in the SSH Terminal terminal can also make the code run normally, but there will be a problem. The interpreter environment used locally by Pycharm is miniconda3, which will cause some packages to be missing, and errors about missing packages will be seen locally, which hinders normal programming. The solution is: the environment of the Pycharm interpreter is also consistent with that of the server. When we create the local and server information interconnection, we choose the required custom environment. The storage location of the custom environment and the initialized miniconda3 will be slightly different. First, we switch to our custom environment through conda activate yolo , and then find the storage path of the environment through conda info , then we can use the custom environment when configuring the server information to select the environment (how to choose the environment, please see what I wrote A blog ): [Target Detection Experiment Series] AutoDL online GPU server rental process and how to use Pycharm software to remotely connect to the server for model training (take the Pycharm remote training Yolov5 project as an example for super detailed) ), as shown in the following figure :
insert image description here
insert image description here

4. Summary

       This blog mainly solves the problem of SSH terminal garbled characters and how to choose a custom conda environment. If you have any questions, please communicate in the comment area! If the blog is helpful to you, please give it a thumbs up, thank you!

Guess you like

Origin blog.csdn.net/qq_32575047/article/details/130229925