推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
yellowmarlboro
V2EX  ›  Python

pip 安装路径问题?

  •  
  •   yellowmarlboro · Apr 1, 2020 · 1940 views
    This topic created in 2250 days ago, the information mentioned may be changed or developed.
    • 刚买的 ali 云服务器,手动创建的用户,登陆之后使用 pip 命令,安装的包总会在 ~/.local 目录下。
    • 之前遇到的这种非 root 用户都是 permission denied,现在怎么默认安装用户目录,是更新什么了?
    • 并没有加--user参数,如果别人用这个用户忘记用 sudo 最后怕包很乱(先不考虑 virtualenv )
    • 看了 /etc 下的 site.py 判断用户目录的文件,找的参数也没有用,python -s site也无效。
    • 怎么变回提示 permission denied 。
    2 replies    2020-04-01 16:48:52 +08:00
    TimePPT
        1
    TimePPT  
    PRO
       Apr 1, 2020 via Android
    用 pyenv +virulenv 吧,安全方便随便折腾,系统的别乱折腾了。
    aloxaf
        2
    aloxaf  
       Apr 1, 2020
    - 看了下是这个 PR 引入的: https://github.com/pypa/pip/pull/7002 。早该这样了,这句 Permission denied 害人不浅。
    - sudo pip install 你是认真的??
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2818 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 14:18 · PVG 22:18 · LAX 07:18 · JFK 10:18
    ♥ Do have faith in what you're doing.