No module named pkg_resources

后端 未结 30 3051
一向
一向 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条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 08:00

    I fixed the error with virtualenv by doing this:

    Copied pkg_resources.py from

    /Library/Python/2.7/site-packages/setuptools

    to

    /Library/Python/2.7/site-packages/

    This may be a cheap workaround, but it worked for me.

    .

    If setup tools doesn't exist, you can try installing system-site-packages by typing virtualenv --system-site-packages /DESTINATION DIRECTORY, changing the last part to be the directory you want to install to. pkg_rousources.py will be under that directory in lib/python2.7/site-packages

提交回复
热议问题