Python の yaml パッケージをインストールするにはどうすればいいですか? 質問する

Python の yaml パッケージをインストールするにはどうすればいいですか? 質問する

YAML を使用する Python プログラムがあります。 を使用して新しいサーバーにインストールしようとするpip install yamlと、次の結果が返されます。

$ sudo pip install yaml
Downloading/unpacking yaml
  Could not find any downloads that satisfy the requirement yaml
No distributions at all found for yaml
Storing complete log in /home/pa/.pip/pip.log

Python の yaml パッケージをインストールするにはどうすればよいですか? Python 2.7 を実行しています。(OS: Debian Wheezy)

ベストアンサー1

検索機能を試すこともできますhttps://pypi.org/検索(ブラウザ経由)そして、短い説明にyamlを含むPyPIのパッケージを探します。すると、PyYaml、yamltools、PySyckなど、さまざまなパッケージが表示されます(PySyck ドキュメントsyck は古いので、PyYaml を使用することをお勧めします。特定のパッケージ名がわかったので、インストールできます。

$ pip install pyyaml

Linux でシステム全体に python yaml をインストールする場合は、次のようなパッケージ マネージャーを使用することもできaptitudeますyum

$ sudo apt-get install python-yaml
$ sudo yum install python-yaml

おすすめ記事