久久久久久久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 運(yùn)行舊的python版本

        sudo python runs old python version(sudo python 運(yùn)行舊的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 運(yùn)行舊的python版本的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我已經(jīng)按照這些說(shuō)明在 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/

                  我已經(jīng)為新 python 的 root 和 myuser 的 bash_profile 添加了別名.現(xiàn)在,當(dāng)我將 python 寫入 shell 時(shí),它可以從兩個(gè)用戶正確運(yùn)行 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 它仍然運(yùn)行舊版本 python2.6.6

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

                  可能是什么問(wèn)題?

                  推薦答案

                  sudo 不使用你的 shell 來(lái)運(yùn)行命令,它只是 exec 直接執(zhí)行命令.這意味著 (a) 沒(méi)有任何源代碼來(lái)自 root 的 bash_profile,因此放在那里的內(nèi)容無(wú)關(guān)緊要,并且 (b) 即使設(shè)置了 shell 別名也無(wú)關(guān)緊要.

                  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 來(lái)運(yùn)行相同的 Python一個(gè).

                  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.

                  最簡(jiǎn)單,也可能是最安全的修復(fù)方法是明確的:運(yùn)行 sudo/path/to/other/python.如果您需要經(jīng)常這樣做,您可以隨時(shí)為其創(chuàng)建別名.

                  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.顯式生成運(yùn)行 pythonbash 命令行,或者(更簡(jiǎn)單地)只使用 -s-i標(biāo)志.(在這種情況下,如果你試圖讓 root 的 ~/.bash_profile 運(yùn)行,-s 不會(huì)這樣做,但 -i 會(huì).)但是 sudo 執(zhí)行 shell 不如 sudo 執(zhí)行程序安全.您的 sudoers 甚至可能被顯式配置為阻止您這樣做.(如果你愿意,你可以用 visudo 來(lái)解決這個(gè)問(wèn)題,但是在不確切了解你正在打開什么的情況下打開一個(gè)安全漏洞通常被認(rèn)為是一件壞事.)

                  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.)

                  這篇關(guān)于sudo python 運(yùn)行舊的python版本的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個(gè)模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點(diǎn)包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復(fù)導(dǎo)入頂級(jí)名稱的情況下構(gòu)造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(分發(fā)帶有已編譯動(dòng)態(tài)共享庫(kù)的 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>

                          • 主站蜘蛛池模板: 天天天干| 日韩国产精品视频 | 高潮毛片无遮挡免费看 | 日本久久网 | 欧美精品入口蜜桃 | 精品少妇3p | 欧美一级免费 | 久久av在线 | 国产精品自拍av | 久久久久亚洲精品 | 激情高潮到大叫狂喷水 | 成人黄色一级片 | 亚洲男人在线 | 国产免费一区二区三区在线观看 | 精品国产一区二区三区久久久蜜月 | 91精品久久久久久 | brazzers精品成人一区 | 午夜精品久久久久久久 | 国产亚洲一区二区三区 | 免费的一级片 | 三级黄色在线观看 | 三级在线观看 | 老司机午夜免费精品视频 | 国产高清一区二区三区 | 国产成人精品免费 | 麻豆av网站 | 国产欧美精品一区二区 | 亚洲第一伊人 | 国产一级一片免费播放放a 免费国产视频 | 亚洲综合激情 | 国产传媒在线播放 | 中文字幕精品三区 | 天堂网在线播放 | 亚洲91av| 深夜福利免费 | 黄色大片免费在线观看 | 日韩在线毛片 | 一区二区三区视频在线播放 | 国产自偷自拍 | 亚洲永久免费 | 亚洲综合成人网 |