All Questions
18 questions
0
votes
1
answer
52
views
Changing python virtual environment when calling a script from a python program
I have a script, foo that changes pyenv virtual environment and runs a python program.
#!/bin/bash
pyenv activate my_env
python main.py
I call the script by
. foo
or, equivalently
source foo
and ...
0
votes
2
answers
534
views
pyenv shell errors after uninstalling pyenv
I've recently been diagnosing why my pyenv installation is giving me errors in the shell. After trying everything I could find, I thought I would remove it from my system. However, after uninstalling, ...
0
votes
2
answers
537
views
Shell often exits after sourcing .bashrc file. Caused by infinite loop in Nvm
Note
I edited the original post to get rid of red herrings and update for the newest .bashrc.
Post
I have a local Mac (using Zsh) and ssh into a EC2-based linux devbox (using Bash).
When I source ~/....
1
vote
1
answer
3k
views
How to restart the shell in script?
I have a script that installs the pyenv package. Installing it requires adding environment variables, then restarting the shell.
apt install -y make build-essential libssl-dev zlib1g-dev \
> libbz2-...
0
votes
1
answer
697
views
Jupiter notebook doesn't find libraries from the virtual env
I created a Pyenv virtual env. After activating the env, I download libraries like pandas into it. However, when I open a jupyter notebook from the same environment's terminal, pandas is not found ...
3
votes
2
answers
9k
views
add Pyenv commands to bashrc or zshrc?
This tutorial to create virtual environments suggests, that I should add these commands to my .bashrc file:
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
On the home ...
0
votes
0
answers
297
views
How to switch back and forth between pyenv python and system python in tmux?
My problem is almost identical to this question. However the solutions don't work when I use tmux. Usually I first open a terminal (bash) and then start a tmux session.
When I then try to use this ...
0
votes
0
answers
511
views
First time using linux and trying to improve my pyenv experiance
This is my first time using Linux and I need to use pyenv in the terminal (I am using a virtual ubuntu session on my windows machine). However, every time I start the windows terminal and shift to the ...
3
votes
0
answers
229
views
Shell is trying to run /usr/bin/virtualenvwrapper.sh when opening
I am pretty new to python (using Python 3.8.5 on MacOS Big Sur Version 11.2) + coding. I tried to make a virtual environment using pyenv but neither was successful. Now, when I open terminal it says:
...
3
votes
0
answers
469
views
How to get pyenv to work with Mac Automator on Mojave?
I'm trying to create an Automator application on Mac OS X Mojave which starts my pyenv.
If I run this command from the bash shell it works fine:
pyenv activate myenv
However from within Automator I ...
3
votes
1
answer
2k
views
Failed to activate virtualenv via shellscript
I'm trying to activate my pyenv-virtualenv environment through very simple bash script like this.
set -e
pyenv activate myenv
But I can't activate my env with below error:
Failed to activate ...
1
vote
1
answer
682
views
kubectl pyenv python version conflict
I'm trying to run some kubectl commands on my mac, where I use pyenv to manage python versions. whenever I run certain kubectl command, it results in an error where kubectl states it cannot find the ...
2
votes
0
answers
1k
views
Crontab: Is it possible to activate `pyenv` as soon as reboot?
Environment : Linux Ubuntu 16.04, pyenv, 'pyenv-virtualenv`
What I want to automate is:
reboot
activate my virtual_environment as soon as reboot
run a command (in this case, honcho start ~~. honcho ...
2
votes
1
answer
3k
views
"command not found: pyenv" when called by zsh script
I have made a launcher on my xubuntu desktop which calls a script named dev_blog.sh.
dev_blog.sh contains :
#!/usr/bin/zsh
echo ça marche
pyenv activate zinnia
/usr/bin/zsh
When I call the launcher ...
4
votes
1
answer
741
views
Using pyenv in a snakemake rule
I am using snakemake for a long and complicated pipeline which involves some externally written python2 scripts. When I try to specify python2 with pyenv, pyenv shell command fails while pyenv global ...