简体   繁体   English

如何安装蟒蛇蛋

[英]How to install a python egg

I'm trying to setup ftw.mail for my postfix installation. 我正在尝试为我的postfix安装设置ftw.mail。 Since I'm new to Linux and Python I don't really have a clue whether it is right, goes in the right direction or is rubbish. 由于我是Linux和Python的新手,我不知道它是否正确,走向正确的方向还是垃圾。

From the official documentation I found this: 从官方文档我发现:

  • Add ftw.mail to your buildout configuration: 将ftw.mail添加到您的buildout配置:
    [instance] [实例]
    eggs += 鸡蛋+ =
    ftw.mail ftw.mail
  • Install the generic setup import profile. 安装通用设置导入配置文件。

(source: https://github.com/4teamwork/ftw.mail/blob/master/README.rst ) (来源: https//github.com/4teamwork/ftw.mail/blob/master/README.rst

My first question is: Would "/etc/postfix/" the so called "buildout configuration"? 我的第一个问题是:“/ etc / postfix /”会是所谓的“buildout配置”吗?

Secondly I had struggles in how to build this "egg" I tried: 其次,我在如何构建我试过的“鸡蛋”方面遇到了困难:

$ wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python for ez_setup

then: 然后:

$ sudo apt-get install python-setuptools

and to finish: 并完成:

$ sudo easy_install ftw.mail

On the console I was told, that the egg was there: 我告诉控制台,鸡蛋在那里:

/usr/local/lib/python2.7/dist-packages/ftw.mail-2.3.1-py2.7.egg /usr/local/lib/python2.7/dist-packages/ftw.mail-2.3.1-py2.7.egg

I found it and I've read that I had to start it with: 我发现它并且我已经读过我必须启动它:

$ PYTHONPATH=/usr/local/lib/python2.7/dist-packages/cssutils-1.0-py2.7.egg

which basically did nothing. 基本上什么都没做。 Now the question is: How do I install the egg? 现在的问题是:我如何安装鸡蛋?

To summarise my questions: 总结一下我的问题:

  1. Is "etc/postfix/" the buildout configuration directory I'm looking for? “etc / postfix /”是我正在寻找的buildout配置目录吗?
  2. How do I install a Python egg? 如何安装Python egg?
  3. And what am I supposed to do with:[instance] eggs += ftw.mail? 我该怎么办:[实例]鸡蛋+ = ftw.mail?
  4. What is a "generic setup import profile"? 什么是“通用设置导入配置文件”?

我想我是这样做的:

$ sudo easy_install /usr/local/lib/python2.7/dist-packages/cssutils-1.0-py2.7.egg

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

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