ubuntu 설치 pip3

1038 단어
pip3 설치 오류
root@localhost:~# pip3 install pymysql Traceback (most recent call last): File "/usr/bin/pip3", line 9, in from pip import main File "/usr/lib/python3/dist-packages/pip/init.py", line 14, in from pip.utils import get_installed_distributions, get_prog File "/usr/lib/python3/dist-packages/pip/utils/init.py", line 23, in from pip.locations import ( File "/usr/lib/python3/dist-packages/pip/locations.py", line 9, in from distutils import sysconfig ImportError: cannot import name 'sysconfig'
  • python 버전과 pip 버전이 일치하지 않음
  • apt autoremove python3-pip
    apt autoremove python3
    apt install python3-pip
    root@localhost:~# pip3 install pymysql
    Collecting pymysql
      Downloading https://files.pythonhosted.org/packages/ed/39/15045ae46f2a123019aa968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-any.whl (47kB)
        100% |████████████████████████████████| 51kB 10kB/s 
    Installing collected packages: pymysql
    Successfully installed pymysql-0.9.3
    
    

    좋은 웹페이지 즐겨찾기