Skip to content

pyenv activate/deactivate not working #13

@carolyn-idi

Description

@carolyn-idi

I am having trouble activating a virtual environment with "pyenv activate".

I restarted my machine and am working in a fresh shell.
I have pyenv installed and it appears to be working correctly.

~ >> pyenv versions
  system
* 2.7.6 (set by /Users/insomniac/.pyenv/version)
  3.3.3

I create a new project and set the python version with pyenv:

>> mkdir myproj
>> cd myproj
myproj >> pyenv local 3.3.3
myproj >> pyenv local
3.3.3

I then create a virtualenv called "foo" and double check it was created

myproj >> pyenv virtualenv foo333

myproj >> pyenv virtualenvs
  foo333 (created from /Users/insomniac/.pyenv/versions/3.3.3)

If I list pyenv versions, it's showing in the list, so I assume the virtual environments are being saved in the same location (this is a bit confusing).

myproj >> pyenv versions
  system
  2.7.6
* 3.3.3 (set by /Users/insomniac/Repo/myproj/.python-version)
  foo333

If I try to active the "foo333" virtual environment for "myproject" I get the following error:

myproj >> pyenv activate foo333
pyenv: no such command `activate'

I restart my shell and try again with the same result:

myproj >> pyenv local
3.3.3
myproj >> pyenv virtualenvs
  foo333 (created from /Users/insomniac/.pyenv/versions/3.3.3)
myproj >> pyenv activate foo333
pyenv: no such command `activate'
myproj >> 

I am able to activate 'foo333' with the following command:

myproj >> source "$(pyenv prefix foo333)/bin/activate"
(foo333) myproj >>

If I try to deactivate - I can only use "deactivate" - I get the same error if I use pyenv deactivate

(foo333) myproj >> pyenv deactivate
pyenv: no such command `deactivate'

(foo333) myproj >> deactivate
myproj >> 

I installed pyenv-virtualenv this morning using "brew install".
Any ideas?

Thanks,
C.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions