Comments (19)
You did the same mistake that I did. You also need eval "$(pyenv init -)"
before the virtualenv-init
from pyenv-virtualenv.
I was having trouble activating virtual environments due to same error mentioned in the original post.
Adding the following to .zshrc
worked for me.
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
from pyenv-virtualenv.
I used the instructions from README, installed via brew and added eval "$(pyenv virtualenv-init -)"
in .zshenv.
from pyenv-virtualenv.
@ankitjain87 and @Githeo If you haven't already given up I was able to get fish working by adding
status --is-interactive; and source (pyenv init -|psub)
status --is-interactive; and source (pyenv virtualenv-init -|psub)
If you installed pyenv-virtualenv using Homebrew.
To my fish config.
~/.config/fish/config.fish
from pyenv-virtualenv.
I figured it out. The issue is that I had the initialisation set in .bash_profile
. It needs to be set in .bashrc
in Mac OS X if it one maintains both configs separately. I'll add a pull request with changes to the README.
from pyenv-virtualenv.
I'm still getting this issue. Any fix / work-around?
from pyenv-virtualenv.
Not completely. Now I can create a virtualenv and list it. But I cannot activate one using pyenv. When activating, I get:
Failed to deactivate virtualenv.
Perhaps pyenv-virtualenv has not been loaded into your shell properly.
Please restart current shell and try again.
Any ideas how to fix/debug? I removed all instances of virtualenv that I had installed manually, I re-installed this package using brew. The output of declare -f pyenv
is empty.
I still have a shell that somehow still works (declare -f shows virtualenvwrapper there which is what I had before). But the newer shells I started up and did this clean up and re-installation with don't work. The way I'm working now using that old shell but I need to be able to get it working from a fresh new shell.
from pyenv-virtualenv.
Have same here. Why did you close issue? Found a workaround?
from pyenv-virtualenv.
@silvansky Yes. How did you install pyenv and pyenv-virtualenv? Also paste anything you've added to your bash_profile related to the, here.
from pyenv-virtualenv.
Wow! I wish this info was in README... Thanks a lot!
from pyenv-virtualenv.
@nayefc Thanks so much for that comment! I'd been editing and removed eval "$(pyenv init -)"
!
from pyenv-virtualenv.
Thanks @nayefc This bug take me 30m to solve
from pyenv-virtualenv.
My PR adds @nayefc's tip to README.
from pyenv-virtualenv.
I am getting the same error when I am trying to activate in fish shell, but working fine in bash.
Also, when I am trying to activate using direct command activate.fish, I am getting this error -
The file '.pyenv/versions/my_project/bin/activate.fish' is not executable by this user
How can I make it working in fish shell
from pyenv-virtualenv.
Same error as @ankitjain87 here.
from pyenv-virtualenv.
Thanks @bradleyhurley, it works!
I hope your trick will be included in the doc.
from pyenv-virtualenv.
I opened a PR - #280
from pyenv-virtualenv.
@imedmar -- THANK YOU!!
from pyenv-virtualenv.
@nayefc Thank you!!!
from pyenv-virtualenv.
Related Issues (20)
- `pyenv virtualenvs` failure on macOS Big Sur HOT 1
- Something like virtualenv-clone HOT 7
- [FR] Local virtualvenvs + registering them / using them through `.python-version` HOT 14
- Force creating venv with same name doesn't update Python version
- Set CONDA_PROMPT_MODIFIER env var when activating conda environment HOT 5
- Env's name disappears from the prompt when spawning a subshell HOT 6
- python3-config (along with other tools) does not respect the version virtualenv hook on HOT 6
- pyenv deactivate doesn't deactivate env HOT 1
- pyenv virtualenv does not correctly link the c++ libraries associated to the python package
- New release? HOT 3
- Latest version HOT 1
- Incorrect version reported by `pyenv virtualenv --version` HOT 1
- Cannot create new virtualenv with "system" Python if it's 3.11+ HOT 1
- Hooks for virtualenv-delete HOT 1
- Hooks don't work under /usr/share/pyenv/plugins
- Virtualenv not isolated HOT 1
- Don't use `.python-version` for auto-activation HOT 3
- "tox: command not found" despite tox being present in the active environment HOT 1
- Unable to use `venv/bin/activate` when the virtual environment of pyenv-virtualenv is set. HOT 2
- virtualenv-init break mc (Midnight Commander) subshell
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyenv-virtualenv.