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

      <bdo id='9n8oc'></bdo><ul id='9n8oc'></ul>
    <tfoot id='9n8oc'></tfoot>

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

      <small id='9n8oc'></small><noframes id='9n8oc'>

      <legend id='9n8oc'><style id='9n8oc'><dir id='9n8oc'><q id='9n8oc'></q></dir></style></legend>

    2. 如何在沒有 sudo 的情況下為 Python 安裝包時避免權(quán)

      how to avoid Permission denied while installing package for Python without sudo(如何在沒有 sudo 的情況下為 Python 安裝包時避免權(quán)限被拒絕)
        <tbody id='ljpPK'></tbody>

      <legend id='ljpPK'><style id='ljpPK'><dir id='ljpPK'><q id='ljpPK'></q></dir></style></legend>
        <bdo id='ljpPK'></bdo><ul id='ljpPK'></ul>
        1. <small id='ljpPK'></small><noframes id='ljpPK'>

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

                本文介紹了如何在沒有 sudo 的情況下為 Python 安裝包時避免權(quán)限被拒絕的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我正在嘗試以用戶 mike 的身份安裝 Python 的 tesseract 包裝器,以便我可以 import tesseract.我在這里遵循指南 https://code.google.com/p/python-tesseract/wiki/HowToCompilePythonTesseractForCentos

                I am trying to install the tesseract wrapper for python as user mike so that I can import tesseract. I'm following the guide here https://code.google.com/p/python-tesseract/wiki/HowToCompilePythonTesseractForCentos

                但是,當(dāng)我執(zhí)行 python setup.py install

                我收到以下錯誤:

                    [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/test-easy-install-7351.write-test'
                
                The installation directory you specified (via --install-dir, --prefix, or
                the distutils default setting) was:
                
                    /usr/local/lib/python2.7/site-packages/
                

                我確實有 sudo 訪問權(quán)限,但問題是:當(dāng)我以 root 身份登錄時,默認(rèn) python 版本是 2.6,但是,當(dāng)我以 mike 身份登錄時,默認(rèn) python版本是 2.7 (這是我想要的).因此,如果我執(zhí)行 sudo python setup.py install 那么 tesseract 的安裝將發(fā)生在 2.6 而不是 2.7.

                I do have sudo access but here is the problem: When I login as root the default python version is 2.6, however, when I login as mike the default python version is 2.7 (this is the one I want). So if I do sudo python setup.py install then the installation for tesseract is taking place on 2.6 rather than on 2.7.

                在這種情況下我能做什么?我應(yīng)該更改 site-packages 文件夾的權(quán)限嗎?我有點沒辦法了……

                What can I do in this scenario? Should I change permissions on the site-packages folder? I'm a bit out of options...

                推薦答案

                試試 python setup.py install --user

                這會將軟件包安裝到 /home/your_user/.local/lib/pythonX.X/site-packages/ 而不是 /usr/local/lib/您沒有權(quán)限的地方(除非您使用 sudo).

                This will install the package on /home/your_user/.local/lib/pythonX.X/site-packages/ instead of /usr/local/lib/ where you don't have permissions (unless you use sudo).

                這篇關(guān)于如何在沒有 sudo 的情況下為 Python 安裝包時避免權(quán)限被拒絕的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                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(如何在不重復(fù)導(dǎo)入頂級名稱的情況下構(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ā)帶有已編譯動態(tài)共享庫的 Python 包)

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

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

                  <tfoot id='aCC9F'></tfoot>
                      <tbody id='aCC9F'></tbody>
                        <bdo id='aCC9F'></bdo><ul id='aCC9F'></ul>
                          <legend id='aCC9F'><style id='aCC9F'><dir id='aCC9F'><q id='aCC9F'></q></dir></style></legend>

                          主站蜘蛛池模板: 亚洲三区视频 | 精品国产乱码久久久久久图片 | 欧美日韩精品一区二区三区视频 | 羞羞的视频在线看 | 亚洲精品久久久久久国产精华液 | 久久久国产精品一区 | 精品成人av| 91在线精品一区二区 | av影音资源 | 成人毛片在线观看 | 久久久久久久av | 欧美日韩一区二区三区视频 | 日韩一区二区三区在线 | 欧美亚洲在线视频 | 国产99视频精品免费播放照片 | 亚洲精品国产a久久久久久 午夜影院网站 | 成人免费看 | 亚洲精品自拍视频 | 成人性生交大免费 | 91在线视频免费观看 | 久久精品久久久久久 | 国产伦精品一区二区三区精品视频 | 国产久 | 一区二区三区免费 | 超碰伊人久久 | 国产精品久久久亚洲 | 欧美日韩在线精品 | 久久久久久久久久久高潮一区二区 | 免费日韩av网站 | 999精品在线观看 | 精品国产精品 | 亚洲免费视频一区 | 国产一区日韩在线 | 国产精品黄色 | 国产色99精品9i | 日韩第一页 | 最新国产福利在线 | 天天爽夜夜骑 | 正在播放国产精品 | 狠狠干美女| 欧美国产精品一区二区三区 |