{"id":937876,"date":"2024-12-26T20:00:29","date_gmt":"2024-12-26T12:00:29","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/937876.html"},"modified":"2024-12-26T20:00:31","modified_gmt":"2024-12-26T12:00:31","slug":"kali-%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/937876.html","title":{"rendered":"kali \u5982\u4f55\u5b89\u88c5python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25073541\/2c678287-30f2-4fe1-99a0-49c189df1b2c.webp\" alt=\"kali \u5982\u4f55\u5b89\u88c5python\" \/><\/p>\n<p><p> <strong>\u5728Kali Linux\u4e2d\u5b89\u88c5Python\u975e\u5e38\u7b80\u5355\uff0c\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u7cfb\u7edf\u81ea\u5e26\u7684\u5305\u7ba1\u7406\u5668apt\u6765\u8fdb\u884c\u3001\u4e5f\u53ef\u4ee5\u901a\u8fc7\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5\u3001\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5982Anaconda\u8fdb\u884c\u5b89\u88c5<\/strong>\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7apt\u6765\u5b89\u88c5\uff0c\u56e0\u4e3a\u5b83\u65b9\u4fbf\u5feb\u6377\uff0c\u5e76\u4e14\u53ef\u4ee5\u786e\u4fdd\u5b89\u88c5\u7684\u7248\u672c\u4e0e\u7cfb\u7edf\u7684\u517c\u5bb9\u6027\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u51e0\u79cd\u65b9\u6cd5\u53ca\u5176\u4f18\u7f3a\u70b9\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001APT\u5305\u7ba1\u7406\u5668\u5b89\u88c5Python<\/p>\n<\/p>\n<p><p>Kali Linux\u57fa\u4e8eDebian\uff0c\u4f7f\u7528APT\u4f5c\u4e3a\u5305\u7ba1\u7406\u5668\u3002\u901a\u8fc7APT\u5b89\u88c5Python\u662f\u6700\u7b80\u5355\u548c\u63a8\u8350\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>1. \u66f4\u65b0APT\u5305\u5217\u8868<\/h3>\n<\/p>\n<p><p>\u5728\u5b89\u88c5Python\u4e4b\u524d\uff0c\u5efa\u8bae\u5148\u66f4\u65b0APT\u7684\u5305\u5217\u8868\uff0c\u4ee5\u786e\u4fdd\u83b7\u53d6\u5230\u6700\u65b0\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\u3002\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt update<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6761\u547d\u4ee4\u4f1a\u66f4\u65b0\u7cfb\u7edf\u4e2d\u6240\u6709\u8f6f\u4ef6\u5305\u7684\u4fe1\u606f\u5217\u8868\u3002<\/p>\n<\/p>\n<p><h3>2. \u5b89\u88c5Python<\/h3>\n<\/p>\n<p><p>\u5b89\u88c5Python3\u7684\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt install python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u4f1a\u5b89\u88c5Python3\u7684\u6700\u65b0\u7a33\u5b9a\u7248\u672c\u3002\u5728Kali Linux\u4e2d\uff0cPython2\u5df2\u7ecf\u88ab\u5f03\u7528\uff0c\u56e0\u6b64\u5efa\u8bae\u5b89\u88c5Python3\u3002<\/p>\n<\/p>\n<p><h3>3. \u9a8c\u8bc1\u5b89\u88c5<\/h3>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1Python\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6761\u547d\u4ee4\u4f1a\u663e\u793aPython3\u7684\u7248\u672c\u53f7\uff0c\u5982\u679c\u663e\u793a\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f18\u70b9<\/strong>\uff1a\u901a\u8fc7APT\u5b89\u88c5Python\u975e\u5e38\u7b80\u5355\uff0c\u5e76\u4e14\u53ef\u4ee5\u81ea\u52a8\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\uff0c\u786e\u4fdd\u5b89\u88c5\u7684Python\u7248\u672c\u4e0e\u7cfb\u7edf\u7684\u517c\u5bb9\u6027\u3002<\/p>\n<\/p>\n<p><p><strong>\u7f3a\u70b9<\/strong>\uff1aAPT\u6e90\u4e2d\u7684Python\u7248\u672c\u53ef\u80fd\u4e0d\u662f\u6700\u65b0\u7684\uff0c\u5982\u679c\u9700\u8981\u6700\u65b0\u7248\u672c\uff0c\u53ef\u80fd\u9700\u8981\u5176\u4ed6\u5b89\u88c5\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u901a\u8fc7\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5Python<\/p>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u7279\u5b9a\u7248\u672c\u7684Python\uff0c\u6216\u8005APT\u6e90\u4e2d\u7684\u7248\u672c\u8fc7\u65e7\uff0c\u53ef\u4ee5\u9009\u62e9\u901a\u8fc7\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><h3>1. \u4e0b\u8f7dPython\u6e90\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4ecePython\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9700\u8981\u7684Python\u7248\u672c\u7684\u6e90\u4ee3\u7801\u5305\u3002\u53ef\u4ee5\u4f7f\u7528wget\u547d\u4ee4\u4e0b\u8f7d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">wget https:\/\/www.python.org\/ftp\/python\/x.x.x\/Python-x.x.x.tgz<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8bf7\u5c06x.x.x\u66ff\u6362\u4e3a\u9700\u8981\u4e0b\u8f7d\u7684\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<p><h3>2. \u89e3\u538b\u6e90\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u89e3\u538b\u6e90\u4ee3\u7801\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">tar -xvf Python-x.x.x.tgz<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u5b89\u88c5\u7f16\u8bd1\u4f9d\u8d56<\/h3>\n<\/p>\n<p><p>\u5728\u7f16\u8bd1Python\u4e4b\u524d\uff0c\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u7f16\u8bd1\u4f9d\u8d56\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4. \u7f16\u8bd1\u548c\u5b89\u88c5<\/h3>\n<\/p>\n<p><p>\u8fdb\u5165\u89e3\u538b\u540e\u7684Python\u76ee\u5f55\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u7f16\u8bd1\u548c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">cd Python-x.x.x<\/p>\n<p>.\/configure --enable-optimizations<\/p>\n<p>make<\/p>\n<p>sudo make altinstall<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6ce8\u610f\uff1a\u4f7f\u7528<code>make altinstall<\/code>\u800c\u4e0d\u662f<code>make install<\/code>\uff0c\u4ee5\u907f\u514d\u8986\u76d6\u7cfb\u7edf\u9ed8\u8ba4\u7684Python\u7248\u672c\u3002<\/p>\n<\/p>\n<p><h3>5. \u9a8c\u8bc1\u5b89\u88c5<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1\u5b89\u88c5\u7684Python\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3.x --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5c063.x\u66ff\u6362\u4e3a\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f18\u70b9<\/strong>\uff1a\u53ef\u4ee5\u5b89\u88c5\u7279\u5b9a\u7248\u672c\u7684Python\uff0c\u5e76\u4e14\u53ef\u4ee5\u542f\u7528\u4e00\u4e9b\u7279\u5b9a\u7684\u7f16\u8bd1\u9009\u9879\u3002<\/p>\n<\/p>\n<p><p><strong>\u7f3a\u70b9<\/strong>\uff1a\u7f16\u8bd1\u5b89\u88c5\u8fc7\u7a0b\u76f8\u5bf9\u590d\u6742\uff0c\u9700\u8981\u624b\u52a8\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\uff0c\u4e14\u9700\u8981\u66f4\u957f\u7684\u5b89\u88c5\u65f6\u95f4\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528Anaconda\u5b89\u88c5Python<\/p>\n<\/p>\n<p><p>Anaconda\u662f\u4e00\u4e2a\u6d41\u884c\u7684Python\u5305\u7ba1\u7406\u548c\u73af\u5883\u7ba1\u7406\u5de5\u5177\uff0c\u7279\u522b\u9002\u5408\u6570\u636e\u79d1\u5b66\u9886\u57df\u7684\u7528\u6237\u3002<\/p>\n<\/p>\n<p><h3>1. \u4e0b\u8f7dAnaconda\u5b89\u88c5\u811a\u672c<\/h3>\n<\/p>\n<p><p>\u4eceAnaconda\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6700\u65b0\u7684Anaconda\u5b89\u88c5\u811a\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528wget\u4e0b\u8f7d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">wget https:\/\/repo.anaconda.com\/archive\/Anaconda3-2023.10-Linux-x86_64.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8bf7\u6ce8\u610f\u66ff\u6362\u4e3a\u6700\u65b0\u7248\u672c\u7684URL\u3002<\/p>\n<\/p>\n<p><h3>2. \u8fd0\u884c\u5b89\u88c5\u811a\u672c<\/h3>\n<\/p>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u5b89\u88c5\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">bash Anaconda3-2023.10-Linux-x86_64.sh<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u811a\u672c\u4f1a\u5f15\u5bfc\u7528\u6237\u5b8c\u6210\u5b89\u88c5\u8fc7\u7a0b\uff0c\u5efa\u8bae\u6309\u9ed8\u8ba4\u8bbe\u7f6e\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><h3>3. \u6fc0\u6d3bAnaconda\u73af\u5883<\/h3>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6fc0\u6d3bAnaconda\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source ~\/anaconda3\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4. \u9a8c\u8bc1\u5b89\u88c5<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1Python\u548cAnaconda\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python --version<\/p>\n<p>conda --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4f18\u70b9<\/strong>\uff1aAnaconda\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5b8c\u6574\u7684Python\u79d1\u5b66\u8ba1\u7b97\u73af\u5883\uff0c\u5305\u542b\u8bb8\u591a\u5e38\u7528\u7684\u5e93\uff0c\u4e14\u6613\u4e8e\u7ba1\u7406\u4e0d\u540c\u7684Python\u7248\u672c\u548c\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p><strong>\u7f3a\u70b9<\/strong>\uff1aAnaconda\u8f83\u4e3a\u5e9e\u5927\uff0c\u5360\u7528\u7684\u78c1\u76d8\u7a7a\u95f4\u8f83\u591a\uff0c\u53ef\u80fd\u4e0d\u9002\u5408\u8d44\u6e90\u6709\u9650\u7684\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528Pyenv\u5b89\u88c5Python<\/p>\n<\/p>\n<p><p>Pyenv\u662f\u4e00\u4e2aPython\u7248\u672c\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u8f7b\u677e\u5728\u591a\u4e2aPython\u7248\u672c\u4e4b\u95f4\u5207\u6362\u3002<\/p>\n<\/p>\n<p><h3>1. \u5b89\u88c5\u4f9d\u8d56<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5Pyenv\u6240\u9700\u7684\u4f9d\u8d56\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u5b89\u88c5Pyenv<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Pyenv\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">curl https:\/\/pyenv.run | bash<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6309\u7167\u63d0\u793a\uff0c\u5c06Pyenv\u7684\u521d\u59cb\u5316\u811a\u672c\u6dfb\u52a0\u5230shell\u914d\u7f6e\u6587\u4ef6\uff08\u5982<del>\/.bashrc\u6216<\/del>\/.zshrc\uff09\u4e2d\uff0c\u7136\u540e\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source ~\/.bashrc<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3. \u5b89\u88c5Python<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Pyenv\u5b89\u88c5\u6240\u9700\u7684Python\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyenv install x.x.x<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5c06x.x.x\u66ff\u6362\u4e3a\u9700\u8981\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<p><h3>4. \u8bbe\u7f6e\u5168\u5c40\u6216\u672c\u5730Python\u7248\u672c<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u8bbe\u7f6e\u5168\u5c40\u6216\u672c\u5730\u7684Python\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyenv global x.x.x<\/p>\n<h2><strong>\u6216\u8005<\/strong><\/h2>\n<p>pyenv local x.x.x<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4f18\u70b9<\/strong>\uff1aPyenv\u53ef\u4ee5\u7075\u6d3b\u7ba1\u7406\u591a\u4e2aPython\u7248\u672c\uff0c\u6613\u4e8e\u5207\u6362\uff0c\u9002\u5408\u9700\u8981\u591a\u4e2a\u7248\u672c\u5e76\u5b58\u7684\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p><strong>\u7f3a\u70b9<\/strong>\uff1a\u9700\u8981\u624b\u52a8\u5b89\u88c5\u548c\u914d\u7f6e\uff0c\u53ef\u80fd\u5bf9\u65b0\u624b\u4e0d\u592a\u53cb\u597d\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3\uff1a\u5728Kali Linux\u4e2d\u5b89\u88c5Python\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u9009\u62e9\u9002\u5408\u81ea\u5df1\u7684\u5b89\u88c5\u65b9\u5f0f\u53ef\u4ee5\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002\u5bf9\u4e8e\u5927\u591a\u6570\u7528\u6237\uff0c\u63a8\u8350\u4f7f\u7528APT\u5b89\u88c5Python\uff0c\u56e0\u4e3a\u5b83\u7b80\u5355\u4e14\u4e0e\u7cfb\u7edf\u517c\u5bb9\u6027\u597d\u3002\u5982\u679c\u9700\u8981\u7279\u5b9a\u7248\u672c\u6216\u79d1\u5b66\u8ba1\u7b97\u73af\u5883\uff0c\u53ef\u4ee5\u9009\u62e9\u6e90\u4ee3\u7801\u7f16\u8bd1\u6216Anaconda\u3002Pyenv\u5219\u9002\u5408\u9700\u8981\u540c\u65f6\u7ba1\u7406\u591a\u4e2aPython\u7248\u672c\u7684\u5f00\u53d1\u8005\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>Kali Linux\u4e2d\u5982\u4f55\u5b89\u88c5\u7279\u5b9a\u7248\u672c\u7684Python\uff1f<\/strong><br \/>\u5728Kali Linux\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528apt\u5305\u7ba1\u7406\u5668\u6765\u5b89\u88c5\u7279\u5b9a\u7248\u672c\u7684Python\u3002\u4f8b\u5982\uff0c\u8981\u5b89\u88c5Python 3.8\uff0c\u53ef\u4ee5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a  <\/p>\n<pre><code class=\"language-bash\">sudo apt update  \nsudo apt install python3.8  \n<\/code><\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c<code>python3.8 --version<\/code>\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<p><strong>\u5728Kali Linux\u4e2d\u5982\u4f55\u4f7f\u7528pip\u7ba1\u7406Python\u5305\uff1f<\/strong><br \/>\u5728Kali Linux\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b89\u88c5pip\u6765\u7ba1\u7406Python\u5305\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a  <\/p>\n<pre><code class=\"language-bash\">sudo apt install python3-pip  \n<\/code><\/pre>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pip3 install &lt;\u5305\u540d&gt;<\/code>\u6765\u5b89\u88c5\u6240\u9700\u7684Python\u5e93\uff0c\u4f7f\u7528<code>pip3 list<\/code>\u6765\u67e5\u770b\u5df2\u5b89\u88c5\u7684\u5e93\u3002<\/p>\n<p><strong>Kali Linux\u652f\u6301\u54ea\u4e9bPython\u7248\u672c\uff1f<\/strong><br \/>Kali Linux\u901a\u5e38\u4f1a\u9884\u88c5Python 2\u548cPython 3\u7684\u591a\u4e2a\u7248\u672c\u3002\u5177\u4f53\u652f\u6301\u7684\u7248\u672c\u53ef\u80fd\u4f1a\u968fKali\u7684\u66f4\u65b0\u800c\u6709\u6240\u4e0d\u540c\u3002\u901a\u8fc7\u8fd0\u884c<code>python --version<\/code>\u548c<code>python3 --version<\/code>\u53ef\u4ee5\u67e5\u770b\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u5bf9\u4e8e\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u5efa\u8bae\u4f7f\u7528Python 3\uff0c\u56e0\u4e3aPython 2\u5df2\u4e8e2020\u5e74\u505c\u6b62\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Kali Linux\u4e2d\u5b89\u88c5Python\u975e\u5e38\u7b80\u5355\uff0c\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u7cfb\u7edf\u81ea\u5e26\u7684\u5305\u7ba1\u7406\u5668apt\u6765\u8fdb\u884c\u3001\u4e5f\u53ef\u4ee5\u901a\u8fc7\u6e90\u4ee3\u7801 [&hellip;]","protected":false},"author":3,"featured_media":937883,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/937876"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=937876"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/937876\/revisions"}],"predecessor-version":[{"id":937888,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/937876\/revisions\/937888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/937883"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=937876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=937876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=937876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}