-
-
Notifications
You must be signed in to change notification settings - Fork 422
How does the auto activation/ deactivation works? #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There are any references to https://github.com/yyuu/pyenv-virtualenv/blob/a02eb0a396f03b70bb6ed9d215cf298f471d8a49/bin/pyenv-virtualenv-init#L114 |
Actually, brew's |
Here's some example how auto-activation works. Let's say if you have 3 directories named With this configuration, when you
|
Thanks for your reply. Now i get it - the notes are not clear at all with regards to how auto-activation works - i.e there is no mention that you can / should run Now i followed the below steps, which match yours but for some reason i can't get the line which indicate what steps took place
As you can see when i go _inside_ dani directory, it gets auto activated but there is no line output as below to indicate if something happen
nor having something like
Any idea? Thx, |
@yyuu - can you please help on the above question? Maybe you can paste:
Many thanks in advance |
I'm using pyenv / pyenv-virtualenv will do nothing about shell's prompt. During the auto-activation scenario, https://github.com/yyuu/pyenv-virtualenv/blob/58e93f9e0d7fa45e44bb2f13caff49668e1cad47/bin/pyenv-virtualenv-init#L123 |
FWIW, I pushed a runnable docker image % docker run -it yyuu/pyenv-virtualenv:issue52 bash
root@d35f7bb54946:/# cat /dani/.python-version
ra4
root@d35f7bb54946:/# pyenv versions
3.4.2
ra4
root@d35f7bb54946:/# cd /dani
pyenv-virtualenv: activate ra4
(ra4) root@d35f7bb54946:/dani# pyenv versions
system
3.4.2
* ra4 (set by /dani/.python-version)
(ra4) root@d35f7bb54946:/dani# python -V
Python 3.4.2
(ra4) root@d35f7bb54946:/dani# cd /
pyenv-virtualenv: deactivate ra4
root@d35f7bb54946:/# pyenv versions
3.4.2
ra4 The following is the Dockerfile I used to create the FROM ubuntu:14.04
MAINTAINER Yamashita, Yuu <[email protected]>
ENV PATH /root/.pyenv/shims:/root/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get --quiet --yes update
RUN apt-get --quiet --yes upgrade
RUN apt-get --quiet --yes install build-essential curl git libbz2-dev libreadline-dev libsqlite3-dev libssl-dev patch zlib1g-dev
RUN git clone --quiet https://github.com/yyuu/pyenv.git /root/.pyenv
RUN cd /root/.pyenv && git reset --hard 35aed21
RUN git clone --quiet https://github.com/yyuu/pyenv-virtualenv.git /root/.pyenv/plugins/pyenv-virtualenv
RUN cd /root/.pyenv/plugins/pyenv-virtualenv && git reset --hard 58e93f9
RUN echo 'eval "$(pyenv init -)"' >> /root/.profile
RUN echo 'eval "$(pyenv virtualenv-init -)"' >> /root/.profile
RUN pyenv install 3.4.2
RUN pyenv rehash
RUN pyenv virtualenv 3.4.2 ra4
RUN mkdir /dani && cd /dani && pyenv local ra4
RUN echo 'exec /bin/bash -l "$@"' > /start && chmod 755 /start
ENTRYPOINT /start |
Thanks for the dockerfile. I don't get it how it doesn't work on my Mac. Anyway, for now i can live with the manual activation/ deactivation + shell unset. Dani |
I'm using I suspect that there might be some configuration issue in your installation. If you found something, please let me know. |
FYI before i upgraded to latest version (using After the upgrade to latest/ greatest my prompt is no longer shown after activation. |
It is expected behaviour after #104. Currently we're not depending |
@yyuu while i do understand the work done to get anaconda env work better i'd appreciate if you add back the prompt to signal is active - otherwise is a massive killer from user experience pov. |
Hm, okay. I understood your request. I might revert them at least for non-fish. (I don't want to revert it for |
@yyuu or if you want you can add a flag which could be set in the .bashrc (same way you set auto activation) to behave as of now or the old way - i.e change prompt to reflect the virtualenv name Thanks! P.S - virtualenv project behavior does show/ change the prompt to reflect the activation |
Pushed 3152718 to restore prompt for non-fish. |
Awesome, it works as expected, thank you! P.S - suggestion: if in the future you planning to remove the prompt (w/o any flag to enable) please make a big note in the readme, in this way we can hold the upgrade ;) |
I'm running Mac 10.9.5 and i did the installation as below:
The installation home is all under
I read the other issues - #47 , #48, #32 , #33 and i've followed the same steps as in #32 (i get this are the manual steps)
BUT because the above behavior, when i'm trying to uninstall the virtual env i get this error
In #47 you mentioned,
As you mentioned, PYENV_DEACTIVATED should not persist after automatically triggered deactivation. I'll try to fix it in #47.
hence my question: _what is the working flow for the auto activation/ deactivation? Do i need to be inside the PYENV_ROOT in order for auto activation to kick in?_
In addition to this issue, according to the README file, the pyenv-virtualenv should be registered as a plugin inside pyenv, is this a bug in the brew formula's installation?
The text was updated successfully, but these errors were encountered: