pip/python: normal site-packages is not writeable

前端 未结 5 1801
迷失自我
迷失自我 2020-12-09 03:05

I have a new Macbook - a user installed it, and then I installed a new user (mine), granted admin privileges and deleted the old one. I am on OS Catalina.

Since the

相关标签:
5条回答
  • 2020-12-09 03:11

    Had this same issue on a fresh install of Debian 9.12. Rebooting my server solved the issue.

    0 讨论(0)
  • 2020-12-09 03:25

    It's best to not use the system-provided Python directly. Leave that one alone since the OS can change it in undesired ways, as you experienced.

    The best practice is to configure your own Python version(s) and manage them on a per-project basis using virtualenv (for Python 2) or venv (for Python 3). This eliminates all dependency on the system-provided Python version, and also isolates each project from other projects on the machine.

    Each project can have a different Python point version if needed, and gets its own site_packages directory so pip-installed libraries can also have different versions by project. This approach is a major problem-avoider.

    0 讨论(0)
  • 2020-12-09 03:25

    It occurs with me when I the virtual enviroment folder name was : venv.

    in this case, It gives errors like :

    No module pip

    Default folder is unwritable

    renaming the folder solve the proplem.

    0 讨论(0)
  • 2020-12-09 03:27

    I had the Same issue with Jetson Nano, Used Sudo and it worked

    So try sudo with pip.

    0 讨论(0)
  • 2020-12-09 03:30

    As @TomdeGeus mentioned in the comments, this command works for me:

    python3 -m pip install [package_name]
    
    0 讨论(0)
提交回复
热议问题