久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <legend id='BcZ9N'><style id='BcZ9N'><dir id='BcZ9N'><q id='BcZ9N'></q></dir></style></legend>
      <tfoot id='BcZ9N'></tfoot>

        <small id='BcZ9N'></small><noframes id='BcZ9N'>

      1. <i id='BcZ9N'><tr id='BcZ9N'><dt id='BcZ9N'><q id='BcZ9N'><span id='BcZ9N'><b id='BcZ9N'><form id='BcZ9N'><ins id='BcZ9N'></ins><ul id='BcZ9N'></ul><sub id='BcZ9N'></sub></form><legend id='BcZ9N'></legend><bdo id='BcZ9N'><pre id='BcZ9N'><center id='BcZ9N'></center></pre></bdo></b><th id='BcZ9N'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='BcZ9N'><tfoot id='BcZ9N'></tfoot><dl id='BcZ9N'><fieldset id='BcZ9N'></fieldset></dl></div>
          <bdo id='BcZ9N'></bdo><ul id='BcZ9N'></ul>
      2. sudo python 運行舊的python版本

        sudo python runs old python version(sudo python 運行舊的python版本)

          <tbody id='HwlfU'></tbody>
            <legend id='HwlfU'><style id='HwlfU'><dir id='HwlfU'><q id='HwlfU'></q></dir></style></legend>

              • <bdo id='HwlfU'></bdo><ul id='HwlfU'></ul>
                <i id='HwlfU'><tr id='HwlfU'><dt id='HwlfU'><q id='HwlfU'><span id='HwlfU'><b id='HwlfU'><form id='HwlfU'><ins id='HwlfU'></ins><ul id='HwlfU'></ul><sub id='HwlfU'></sub></form><legend id='HwlfU'></legend><bdo id='HwlfU'><pre id='HwlfU'><center id='HwlfU'></center></pre></bdo></b><th id='HwlfU'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HwlfU'><tfoot id='HwlfU'></tfoot><dl id='HwlfU'><fieldset id='HwlfU'></fieldset></dl></div>
              • <small id='HwlfU'></small><noframes id='HwlfU'>

                  <tfoot id='HwlfU'></tfoot>
                • 本文介紹了sudo python 運行舊的python版本的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我已經按照這些說明在 CentOS 6 上安裝了 python 2.7.3

                  I have installed python 2.7.3 on CentOS 6 with thse instructions

                  http://villaroad.com/2010/10/rolling-python-2-6-2-on-centos-5-3/

                  我已經為新 python 的 root 和 myuser 的 bash_profile 添加了別名.現在,當我將 python 寫入 shell 時,它可以從兩個用戶正確運行 python2.7.3.

                  I have added aliases to bash_profile of both root and myuser for new python. Now when I write python to shell, it runs python2.7.3 correctly from both users.

                  但是,如果我寫 sudo python 它仍然運行舊版本 python2.6.6

                  However, if I write sudo python it stills runs old version python2.6.6

                  可能是什么問題?

                  推薦答案

                  sudo 不使用你的 shell 來運行命令,它只是 exec 直接執行命令.這意味著 (a) 沒有任何源代碼來自 root 的 bash_profile,因此放在那里的內容無關緊要,并且 (b) 即使設置了 shell 別名也無關緊要.

                  sudo doesn't use your shell to run commands, it just execs the command directly. This means (a) there's nothing that sources root's bash_profile, so it doesn't matter what you put there, and (b) shell aliases wouldn't matter even if they were set.

                  因此,如果您想使用 aliases 指定與 PATH 中的 Python 不同的 Python,則不能使用 sudo python 來運行相同的 Python一個.

                  So, if you want to use aliases to specify a different python than the one that's on your PATH, you can't use sudo python to run that same one.

                  最簡單,也可能是最安全的修復方法是明確的:運行 sudo/path/to/other/python.如果您需要經常這樣做,您可以隨時為其創建別名.

                  The easiest, and probably safest, fix is to be explicit: run sudo /path/to/other/python. If you need to do this often enough, you can always create an alias for that.

                  如果你真的想要,可以sudo 使用 shell.顯式生成運行 pythonbash 命令行,或者(更簡單地)只使用 -s-i標志.(在這種情況下,如果你試圖讓 root 的 ~/.bash_profile 運行,-s 不會這樣做,但 -i 會.)但是 sudo 執行 shell 不如 sudo 執行程序安全.您的 sudoers 甚至可能被顯式配置為阻止您這樣做.(如果你愿意,你可以用 visudo 來解決這個問題,但是在不確切了解你正在打開什么的情況下打開一個安全漏洞通常被認為是一件壞事.)

                  If you really want to, you can make sudo use a shell. Either explicitly generate the bash command line that runs python, or (more simply) just use the -s or -i flags. (In this case, if you're trying to get root's ~/.bash_profile run, -s won't do it, but -i will.) But sudoing shells is not as safe as sudoing programs. Your sudoers may even be explicitly configured to prevent you from doing it. (You can fix that with visudo if you want, but opening a security hole without understanding exactly what you're opening is generally considered a bad thing to do.)

                  這篇關于sudo python 運行舊的python版本的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)
                    <tbody id='AY4x7'></tbody>
                  <tfoot id='AY4x7'></tfoot>

                      <i id='AY4x7'><tr id='AY4x7'><dt id='AY4x7'><q id='AY4x7'><span id='AY4x7'><b id='AY4x7'><form id='AY4x7'><ins id='AY4x7'></ins><ul id='AY4x7'></ul><sub id='AY4x7'></sub></form><legend id='AY4x7'></legend><bdo id='AY4x7'><pre id='AY4x7'><center id='AY4x7'></center></pre></bdo></b><th id='AY4x7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='AY4x7'><tfoot id='AY4x7'></tfoot><dl id='AY4x7'><fieldset id='AY4x7'></fieldset></dl></div>

                        <legend id='AY4x7'><style id='AY4x7'><dir id='AY4x7'><q id='AY4x7'></q></dir></style></legend>

                        <small id='AY4x7'></small><noframes id='AY4x7'>

                          • <bdo id='AY4x7'></bdo><ul id='AY4x7'></ul>

                          • 主站蜘蛛池模板: 亚洲深夜福利 | 在线成人一区 | 久久精品久久久 | 91精品国产综合久久福利软件 | 国产高清在线视频 | 国内91在线| 精品在线 | 福利片一区二区 | av在线免费观看不卡 | 九色国产 | h视频在线免费 | 久久久久国 | 羞羞的视频免费观看 | 国产精品九九九 | 亚洲一区二区久久久 | 91成人精品 | 一区二区三区中文字幕 | 色综合成人网 | 免费观看成人鲁鲁鲁鲁鲁视频 | 91天堂| 亚洲视频1区| 黄色大片在线视频 | 天天拍天天插 | 黄色亚洲网站 | 欧美日韩福利 | 美日韩免费视频 | 在线视频一区二区 | 麻豆精品国产91久久久久久 | 福利网址 | 日韩成人免费视频 | 色狠狠桃花综合 | 亚洲第一天堂 | 亚洲男人天堂 | 91福利在线观看 | 综合激情久久 | 中文字幕成人av | 国产成人99久久亚洲综合精品 | 成人国产精品久久 | 国产精品国产a级 | 成人免费三级电影 | 久久久精品一区二区三区四季av |