How to get virtualenv to use dist-packages on Ubuntu?

后端 未结 5 1908
一向
一向 2020-12-13 20:06

I know that virtualenv, if not passed the --no-site-packages argument when creating a new virtual environment, will link the packages in /usr/local/lib/py

5条回答
  •  时光取名叫无心
    2020-12-13 20:43

    PYTHONPATH works for me.

    vim ~/.bashrc
    

    add this line below:

    export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages
    source ~/.bashrc
    

提交回复
热议问题