Comments (10)
Hmm, I can't reproduce this, for me if pyenv-virtualenv
is not installed then the result of $(pyenv virtualenv-init -)
is an empty string, and nothing happens (no exceptions).
Using xonsh
0.9.18.
If you still have this issue, please enable $XONSH_SHOW_TRACEBACK
and provide more details.
from xontrib-langenv.
When starting a XONSH shell (with xontrib load pyenv in .xonshrc) I get the message:
pyenv: no such command `virtualenv-init'
(I have $XONSH_SHOW_TRACEBACK set to True).
Then I brew installed pyenv-virtualenv. It makes the message/error go away.
However, it seems pyenv virtualenv myvenv + pyenv activate myvenv does NOT work properly the virtualenv is not activated.
from xontrib-langenv.
Sorry, I missed this issue completely. Checking.
from xontrib-langenv.
I've commited a change into master
to suppress the "no such command" error while checking for pyenv-virtualenv
, if you have a chance, please check.
The other issue is more interesting, for me it works as inteded:
❯ pyenv virtualenv test
Looking in links: /tmp/tmpahxyqpfz
Requirement already satisfied: setuptools in /home/dyuri/.pyenv/versions/test/lib/python3.9/site-packages (56.0.0)
Requirement already satisfied: pip in /home/dyuri/.pyenv/versions/test/lib/python3.9/site-packages (21.1.3)
❯ pyenv activate test
pyenv-virtualenv: prompt changing will be removed from future release. configure `export PYENV_VIRTUALENV_DISABLE_PROMPT=1' to simulate the behavior.
❯ which python
/home/dyuri/.pyenv/shims/python
❯ $VIRTUAL_ENV
'/home/dyuri/.pyenv/versions/test'
❯ pyenv deactivate cica
❯ $VIRTUAL_ENV
Traceback (Most recent call last):
1 <xonsh-code> <module> -->
KeyError: 'Unknown environment variable: $VIRTUAL_ENV'
❯ pyenv virtualenv-delete test
pyenv-virtualenv: remove /home/dyuri/.pyenv/versions/test? y
Is the pyenv
alias working in your session? You can check that this way:
❯ which pyenv
<function create_alias.<locals>.pyenv at 0x7faefcbb58b0>
from xontrib-langenv.
I brew uninstalled pyenv-virtualenv.
I did a brew update+upgrade.
I brew uninstalled + installed pyenv.
I still get the error message. Maybe you haven't pushed to Home-brew (don't know how that works)?
from xontrib-langenv.
No, I did not, and no, pyenv-virtualenv is not my package, xontrib-pyenv is. A minute and I publish a new version to PyPI.
from xontrib-langenv.
I see. What is the best procedure to get your latest version?
from xontrib-langenv.
New version (1.0.6) released to PyPI (https://pypi.org/project/xontrib-pyenv/), I hope brew uses that.
from xontrib-langenv.
I'm using pip
to install python packages, but I use Linux (I suppose you use Mac).
from xontrib-langenv.
Everything seems to work now, including the virtualenv stuff. Great! Thanks for the prompt action.
For others who may read this: xpip uninstall xontrib-pyenv, followed by a similar install.
If pyenv-virtualenv is not installed: no more error message. With pyenv-virtualenv installed, pyenv virtualenvs work.
BTW it would be useful if you could add to the contributing-pyenv docs that no other installation steps (as stipulated in the pyenv docs) are necessary.
from xontrib-langenv.
Related Issues (13)
- Error while loading pyenv xontrib HOT 3
- Remove pyenv duplicate command and add no-rehash HOT 1
- Maybe convert xsh to py for faster startup?
- Skip bash environment
- Improve startup speed by skipping all bash calls (set environment/alias directly)
- 'shell' subcommand doesn't print current version HOT 1
- Deprecation warning on install HOT 1
- shims path is no longer added to PATH HOT 1
- Want to expand to do nodenv/goenv/rbenv as well? HOT 5
- Error when pyenv xontrib loaded HOT 4
- With Ubuntu 22.04 I can't use this if I load pyenv HOT 3
- Getting command not found `ForeignShellFunctionAlias(extra_args=(), funcname='pyenv', shell='bash')` HOT 8
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 xontrib-langenv.