{"id":289,"date":"2026-01-26T02:47:15","date_gmt":"2026-01-26T02:47:15","guid":{"rendered":"https:\/\/blog.gpst.net.cn:4008\/?p=289"},"modified":"2026-01-28T06:24:14","modified_gmt":"2026-01-28T06:24:14","slug":"debian12-pip3-install-runlike%e6%8a%a5%e9%94%99%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/opshub.com.cn\/?p=289","title":{"rendered":"debian12 pip3 install runlike\u62a5\u9519\u95ee\u9898\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"\n<p>apt install python3-pip<\/p>\n\n\n\n<p>\u62a5\u9519\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"515\" src=\"https:\/\/blog.opshub.com.cn\/wp-content\/uploads\/2026\/01\/image-21-1024x515.png\" alt=\"\" class=\"wp-image-290\" srcset=\"https:\/\/opshub.com.cn\/wp-content\/uploads\/2026\/01\/image-21-1024x515.png 1024w, https:\/\/opshub.com.cn\/wp-content\/uploads\/2026\/01\/image-21-300x151.png 300w, https:\/\/opshub.com.cn\/wp-content\/uploads\/2026\/01\/image-21-768x386.png 768w, https:\/\/opshub.com.cn\/wp-content\/uploads\/2026\/01\/image-21.png 1288w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u7b2c\u4e00\u79cd\uff1a\u4f7f\u7528venv\u865a\u62df\u73af\u5883\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install python3-venv\nmkdir -p $HOME\/.env &amp;&amp; python3 -m venv $HOME\/.env\/project_name\n$HOME\/.env\/project_name\/bin\/python -m pip install --upgrade pip\n$HOME\/.env\/project_name\/bin\/python -m pip install runlike\nsource $HOME\/.env\/project_name\/bin\/activate\nrunlike -p XXXXX<\/code><\/pre>\n\n\n\n<p>\u7b2c\u4e8c\u79cd\uff1a\u4f7f\u7528pipx\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install pipx\npipx install runlike\npipx ensurepath \/\/\u81ea\u52a8\u6dfb\u52a0\u73af\u5883\u53d8\u91cfPATH<\/code><\/pre>\n\n\n\n<p>\u7b2c\u4e09\u79cd\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mv \/usr\/lib\/python3.11\/EXTERNALLY-MANAGED{,.bak}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>apt install python3-pip \u62a5\u9519\uff1a \u7b2c\u4e00\u79cd\uff1a\u4f7f\u7528venv\u865a\u62df\u73af\u5883\uff1a \u7b2c\u4e8c\u79cd\uff1a\u4f7f\u7528pipx\uff1a \u7b2c\u4e09\u79cd\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-289","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=289"}],"version-history":[{"count":3,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/289\/revisions"}],"predecessor-version":[{"id":630,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/289\/revisions\/630"}],"wp:attachment":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}