No module named pkg_resources

后端 未结 30 2481
一向
一向 2020-11-22 07:22

I\'m deploying a Django app to a dev server and am hitting this error when I run pip install -r requirements.txt:

Traceback (most recent call la         


        
30条回答
  •  旧时难觅i
    2020-11-22 07:59

    ImportError: No module named pkg_resources: the solution is to reinstall python pip using the following Command are under.

    Step: 1 Login in root user.

    sudo su root
    

    Step: 2 Uninstall python-pip package if existing.

    apt-get purge -y python-pip
    

    Step: 3 Download files using wget command(File download in pwd )

    wget https://bootstrap.pypa.io/get-pip.py
    

    Step: 4 Run python file.

    python ./get-pip.py
    

    Step: 5 Finaly exicute installation command.

    apt-get install python-pip
    

    Note: User must be root.

提交回复
热议问题