virtualenv: cannot import name 'main'

前端 未结 4 1392
情深已故
情深已故 2020-12-19 06:24

I\'m having a little trouble with virtualenv on Mac OS X Yosemite. After I couldn\'t run virtualenv at all first, I installed Python 3 via brew (previously I in

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-19 07:10

    After my upgrade to Fedora 32 I had the same issue which lead me to this question:

    ImportError: cannot import name 'main' from 'virtualenv'
    

    In my case I actually seemed to have both /usr/local/bin/virtualenv as well as $HOME/.local/lib/python3.8/site-packages/virtualenv/__init__.py.

    Removing the user virtualenv version and reinstalling it into the system with root fixed the issue:

    pip uninstall virtualenv
    
    sudo pip install virtualenv
    

提交回复
热议问题