Why can't `virtualenv` find `pkg_resources`?

前端 未结 3 741
南方客
南方客 2021-02-15 02:01

I\'m trying to use virtualenv in Ubuntu to install a local virtual Python environment. When I run the shell command:

$ virtualenv ./virt_python
<
3条回答
  •  孤街浪徒
    2021-02-15 02:41

    I had the same problem when trying to run virtualenv, found out the virtualenv was installed in /home/{user}/install/lib/python2.7/site-packages while the python was pointing to /home/{user}/install/bin/virtualenv - you should know this by running

    which virtualenv
    

    So I had to uninstall and reinstall virtualenv

    pip uninstall virtualenv 
    pip install virtualenv
    

    This worked for me.

提交回复
热议问题