296 lines
9.5 KiB
HTML
296 lines
9.5 KiB
HTML
|
|
|
|
<!DOCTYPE html>
|
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="zh-CN" > <![endif]-->
|
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="zh-CN" > <!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>安装指南 — Xtaothon Documentation</title>
|
|
|
|
|
|
|
|
|
|
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
|
|
|
|
|
|
|
<link rel="canonical" href="https://docs.xtaolabs.com/intro/install.html"/>
|
|
|
|
|
|
|
|
<script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
|
|
|
|
|
|
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
|
|
<script src="../_static/jquery.js"></script>
|
|
<script src="../_static/underscore.js"></script>
|
|
<script src="../_static/doctools.js"></script>
|
|
<script src="../_static/clipboard.min.js"></script>
|
|
<script src="../_static/copybutton.js"></script>
|
|
<script src="../_static/translations.js"></script>
|
|
|
|
<script type="text/javascript" src="../_static/js/theme.js"></script>
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/copybutton.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/tabs.css" type="text/css" />
|
|
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
|
|
<link rel="index" title="索引" href="../genindex.html" />
|
|
<link rel="search" title="搜索" href="../search.html" />
|
|
<link rel="next" title="授权" href="../start/auth.html" />
|
|
<link rel="prev" title="快速开始" href="quickstart.html" />
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav">
|
|
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
|
<div class="wy-side-scroll">
|
|
<div class="wy-side-nav-search" >
|
|
|
|
|
|
|
|
<a href="../index.html">
|
|
|
|
|
|
|
|
|
|
<img src="../_static/xtaothon.png" class="logo" alt="Logo"/>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="search">
|
|
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="caption"><span class="caption-text">简介</span></p>
|
|
<ul class="current">
|
|
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">快速开始</a></li>
|
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">安装指南</a><ul>
|
|
<li class="toctree-l2"><a class="reference internal" href="#id3">安装</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#id4">安装开发版本</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#id5">验证安装</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">开始</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../start/auth.html">授权</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../start/invoking.html">调用方法</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../start/updates.html">处理消息</a></li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">API</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../api/client.html">客户端</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../api/methods/index.html">可用方法</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../api/types/index.html">可用类型</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../api/bound-methods/index.html">绑定方法</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../api/handlers.html">消息更新处理器</a></li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">主题指南</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../topics/proxy.html">SOCKS5 Proxy</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../topics/text-formatting.html">文本格式</a></li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">更多</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../faq.html">FAQ</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../glossary.html">常见短语</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../support.html">支持 Xtaothon</a></li>
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
<nav class="wy-nav-top" aria-label="top navigation">
|
|
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="../index.html">xtaothon</a>
|
|
|
|
</nav>
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
|
|
<div class="rst-content style-external-links">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
|
|
<ul class="wy-breadcrumbs">
|
|
|
|
<li><a href="../index.html">Docs</a> »</li>
|
|
|
|
<li>安装指南</li>
|
|
|
|
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
|
|
|
|
<!-- User defined GitHub URL -->
|
|
<a href="https://github.com/Xtao-Labs/docs-all" class="fa fa-github"> Edit on GitHub</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div itemprop="articleBody">
|
|
|
|
<div class="section" id="id1">
|
|
<h1>安装指南<a class="headerlink" href="#id1" title="永久链接至标题">¶</a></h1>
|
|
<p><strong>Telethon</strong> 所需要的 Python 的版本至少为 3.5 。我们推荐您使用最新的 Python 和 pip 版本。</p>
|
|
<ul class="simple">
|
|
<li><p>从 <a class="reference external" href="https://www.python.org/downloads/">https://www.python.org/downloads/</a> 中下载 <strong>Python 3</strong> (或者使用系统包管理器)。</p></li>
|
|
<li><p>从 <a class="reference external" href="https://pip.pypa.io/en/latest/installing/">https://pip.pypa.io/en/latest/installing/</a> 中安装 <strong>pip</strong> 。</p></li>
|
|
</ul>
|
|
<div class="admonition important">
|
|
<p class="admonition-title">重要</p>
|
|
<p>Telethon 仅支持 <strong>Python 3.5+</strong> 。</p>
|
|
</div>
|
|
<div class="contents local topic" id="id2">
|
|
<p class="topic-title">目录</p>
|
|
<ul class="simple">
|
|
<li><p><a class="reference internal" href="#id3" id="id6">安装</a></p></li>
|
|
<li><p><a class="reference internal" href="#id4" id="id7">安装开发版本</a></p></li>
|
|
<li><p><a class="reference internal" href="#id5" id="id8">验证安装</a></p></li>
|
|
</ul>
|
|
</div>
|
|
<hr class="docutils" />
|
|
<div class="section" id="id3">
|
|
<h2>安装<a class="headerlink" href="#id3" title="永久链接至标题">¶</a></h2>
|
|
<ul>
|
|
<li><p>将 Telethon 安装和升级到其最新稳定版本的最简单方法是使用 <strong>pip</strong>:</p>
|
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>$ python3 -m pip install --upgrade telethon
|
|
</pre></div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section" id="id4">
|
|
<h2>安装开发版本<a class="headerlink" href="#id4" title="永久链接至标题">¶</a></h2>
|
|
<p>如果您希望尝试新功能,则可以运行以下命令安装开发版本:</p>
|
|
<div class="admonition important">
|
|
<p class="admonition-title">重要</p>
|
|
<p>开发版本可能会发生错误,不建议用于生产环境。</p>
|
|
</div>
|
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>$ python3 -m pip install --upgrade https://github.com/LonamiWebs/Telethon/archive/master.zip
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="id5">
|
|
<h2>验证安装<a class="headerlink" href="#id5" title="永久链接至标题">¶</a></h2>
|
|
<p>要验证是否正确安装了 Telethon ,请运行以下命令:(如果没有错误显示即安装成功)</p>
|
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>$ python3 -c "import telethon; print(telethon.__version__)"
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<footer>
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
<a href="../start/auth.html" class="btn btn-neutral float-right" title="授权" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
|
|
|
|
|
<a href="quickstart.html" class="btn btn-neutral float-left" title="快速开始" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
|
|
|
</div>
|
|
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
jQuery(function () {
|
|
SphinxRtdTheme.Navigation.enable(false);
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html> |