简体   繁体   中英

How to reinstall python env for GM?

Recently the conda environment for GMS crashed, so I delete the folder of miniconda3. I wonder how can I reinstall it. Do I need to reinstall GMS?

As far as I know you don't need to reinstall GMS completely but I would suggest it.


If you want to install Miniconda manually, download the corresponding installer from the official Miniconda site . Take any miniconda installation with python 3.7.

Install Miniconda in the same directory as before (not necessary, but recommended). For windows this is %ProgramData%\\Miniconda3 .

After installation create a new environment. The default environment coming with GMS is called GMS_VENV_PYTHON but you can use any name you want. You can do that by running the command

conda create --name GMS_VENV_PYTHON python=3.7.2

Note that GMS 3.4 comes with python 3.7.2 but according to the help you can use any python 3.7, there is no problem with "versions that differ by minor version, eg 3.7.5 and 3.7.6" (GMS help in Python > Installation and Configuration > Configuration ).

After restarting your computer open GMS and go to File > Global Info and in the General tab on the left open Scripting . In the bottom you can choose your python version. Select the created environment ( GMS_VENV_PYTHON ).

After restarting GMS python scripting should work again. If not, make sure minicondas python is listed in the PATH .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM