简体   繁体   English

如何将 yaml 安装到站点包

[英]How to install yaml to site-packages

I want to know how to install YAML packages to site-packages because I need it for Blender.我想知道如何将 YAML 包安装到站点包,因为我需要它用于 Blender。 I already tried "C:\Program Files\Blender Foundation\Blender 3.0\3.0\python\bin\python.exe" -m pip install yaml -t"C:\Program Files\Blender Foundation\Blender 3.0\3.0\python\lib\site-packages" as administrator, but this appeared.我已经尝试过"C:\Program Files\Blender Foundation\Blender 3.0\3.0\python\bin\python.exe" -m pip install yaml -t"C:\Program Files\Blender Foundation\Blender 3.0\3.0\python\lib\site-packages"作为管理员,但这出现了。 在此处输入图像描述

The name of the package is PyYAML so you need to install it via package 的名称是 PyYAML,因此您需要通过以下方式安装它

pip install PyYAML

NOTE: Be aware that while the name of the package on pypi and the name of the python module are almost always the same, they do not have to be.注意:请注意,虽然pypi上 package 的名称和 python 模块的名称几乎总是相同,但它们不必相同。 In this case, the package is called PyYAML, however once you've installed it, it's imported via在这种情况下,package 称为 PyYAML,但是一旦安装它,它就会通过以下方式导入

import yaml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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