• mac pip 安装插件后不在自己设置的目录,如何解决 Defaulting to user installation because normal sitepackages is not writeable


    1、使用命令 

    python3 -m site --user-site
    
    /Users/nxy/Library/Python/3.9/lib/python/site-packages

    2、安装插件

    pip3 install pytz
    Defaulting to user installation because normal site-packages is not writeable
    Requirement already satisfied: pytz in /Library/Python/3.7/site-packages (2022.1)

    3、解决方案:

    python3 -m pip install --upgrade pip
    DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
    Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (22.1.1)
    Collecting pip
      Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 34.7 kB/s eta 0:00:00
    Installing collected packages: pip
      Attempting uninstall: pip
        Found existing installation: pip 22.1.1
        Uninstalling pip-22.1.1:
          Successfully uninstalled pip-22.1.1

    4、再次安装发现神奇的好了

    pip3 install pytz                   
    DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
    Collecting pytz
      Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 503.5/503.5 kB 42.4 kB/s eta 0:00:00
    Installing collected packages: pytz
      DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
    DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
    Successfully installed pytz-2022.1
  • 相关阅读:
    什么是ORM
    ORM优缺点
    Azure 中快速搭建 FTPS 服务
    连接到 Azure 上的 SQL Server 虚拟机(经典部署)
    在 Azure 虚拟机中配置 Always On 可用性组(经典)
    SQL Server 2014 虚拟机的自动备份 (Resource Manager)
    Azure 虚拟机上的 SQL Server 常见问题
    排查在 Azure 中新建 Windows 虚拟机时遇到的经典部署问题
    上传通用化 VHD 并使用它在 Azure 中创建新 VM
    排查在 Azure 中新建 Windows VM 时遇到的部署问题
  • 原文地址:https://www.cnblogs.com/ningy1009/p/16415668.html
Copyright © 2020-2023  润新知