When moving the project from the old computer to the new computer, when moving the project, the environment of the original project was also copied, and it was found that there was a problem. When using pip to install the library, it couldn't be used at all. The error content is:
Fatal error in launcher: Unable to create process using '"D:\Anaconda\envs\chepaishibie_yolov5\python.exe" "F:\ProgramData\anaconda3\envs\chepaishibie_yolov5\Scripts\pip.exe" install pythonnet': ???????????
Step 1: Open the file---->setting of pycharm, click load, otherwise the "use existing environment" below will not appear, and then click the down menu, and the copied environment will appear (automatic loading)
Select the copied installation environment
Step 2: Activate the environment
Just close the console window and open it again. You can see that the picture below has been switched to the chepaishibie_yolov5 environment (I directly entered the a activate chepaishibie_yolov5 command in the control window in the picture below, but it didn’t work, so I entered it in the cmd window )
Enter the pip command in the window to report an error
Fatal error in launcher: Unable to create process using '"D:\Anaconda\envs\chepaishibie_yolov5\python.exe" "F:\ProgramData\anaconda3\envs\chepaishibie_yolov5\Scripts\pip.exe" install pythonnet': ???????????
The environment location in the picture below is not my current environment location, but the environment location of my old computer
Step 3: Modify the path
Find the file "F:\ProgramData\anaconda3\envs\chepaishibie_yolov5\Scripts\pip.exe" in my copied environment, right click and open with Notepad, search for the word anaconda in my pip file, modify the path, modify into the current actual path.
After modification, save
Run the pip command again, as shown in the figure below, it is successful.