Sunday, 15 January 2012

python - Pyenv virtualenv not activating, tried everything I know -



python - Pyenv virtualenv not activating, tried everything I know -

if help me out issue wonderful. i've tried on lastly few days work no success. have used pyenv , plugin virtualenv month no issues. 1 day woke , found unable activate virtualenv created pyenv. source bin/activate stopped working. did reinstalling pyenv way reinstalling kubuntu , trying 1 time again no success. can't tell whats wrong. no errors can see image below. understanding every time activated virtualenv show in console before name isn't doing anymore. made sure add together "echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc" , other things required. other options available pyenv still work fine, activating of virtualenv. please help. thanks

this took me bit understand too, because managed virtualenv's virtualenvwrapper before. helped looked through function , saw this:

if [[ "$(pyenv version-name)" == "system" ]]; pyenv deactivate || true elif [[ "$virtual_env" != "$(pyenv prefix)" ]]; pyenv deactivate || true pyenv activate 2>/dev/null || true fi

what isn't covered when create virtualenv in pyenv, shows version. when do

pyenv versions

you list of pythons -with- virtual environments. work, combination of old functionality , new. can do:

user@server [00:00:00] [~] -> % cd development/test user@server [00:00:00] [~/development/test] -> % pyenv shell test (test)user@server [00:00:00] [~/development/test] -> %

or automagic:

user@server [00:00:00] [~] -> % cd development/test user@server [00:00:00] [~/development/test] -> % pyenv local test (test)user@server [00:00:00] [~/development/test] -> %

this drops .python-version file python version, pyenv reads , uses virtualenv python.

just remember manage virtualenv python versions of pyenv , should able maintain things straight. instance, deactivate automagically alter directories. if did pyenv shell, need pyenv shell --unset or pyenv shell {another_version} move virtualenv.

hope helps!

python virtualenv kubuntu

No comments:

Post a Comment