我要评分
获取效率
正确性
完整性
易理解

Installing PyYAML

PyYAML is installed for the PyYAML library in the MongoDB configuration file to correctly parse and read the YAML configuration file.

  1. Go to the /root directory.
    1
    cd /root
    
  2. Clone PyYAML in the Git code repository.

    If the git clone command fails to be executed, replace github.com with github.com.cnpmjs.org and run the download command again.

    1
    git clone -b 3.11 https://github.com/yaml/pyyaml.git
    

  3. Install PyYAML.
    • If the MongoDB version is 3.6.13 or 4.0.12, run the following commands:
      1
      2
      cd /root/pyyaml
      python2 setup.py install
      
    • If the MongoDB version is 6.1.0, run the following commands:
      1
      2
      cd /root/pyyaml
      python3 setup.py install
      

    Output for the start:

    Output for the end: