Getting a python virtual env error after installing Lion

后端 未结 9 554
情话喂你
情话喂你 2020-12-04 19:44

I haven\'t touched python and virtualenv in a while, and I believe I setup my MBP with virtualenv and pip, but have totally forgotten how this stuff works.

After ins

9条回答
  •  不知归路
    2020-12-04 20:27

    My solution on Ubuntu 14.04 where I had installed python3.4 was to add this to the ~/.bashrc file so that the tail of it looked liked this:

    #Setup virtual envwrapper for python in case default doesn't work
    VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.4
    export VIRTUALENVWRAPPER_PYTHON
    
    # needed for virtualenvwrapper
    export WORKON_HOME=$HOME/.virtualenvs
    export PROJECT_HOME=$HOME/projects
    source /usr/local/bin/virtualenvwrapper.sh
    

    When I did pip freeze on regular python which was 2.7 it showed packages installed correctly but still complained. Even though it complained the virtualenv did work.

    I have later removed the errors by making sure that all the files in the ~/.virtualenvs belong to the user and group rather than a smattering of them to root. Like this:

    bash cd ~ sudo chown -R ubuntu:ubuntu .virtualenvs

提交回复
热议问题