Skip to content
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

python environment not setup correctly on fresh Debian 8 install #11

Closed
2600box opened this issue Jan 24, 2017 · 9 comments
Closed

python environment not setup correctly on fresh Debian 8 install #11

2600box opened this issue Jan 24, 2017 · 9 comments
Labels

Comments

@2600box
Copy link

2600box commented Jan 24, 2017

I have a fresh Debian 8 install.

Used pimp-my-box to install, but the default environment complains about "--no-error" is not a version and the default python environment is not loaded.

i removed the --no-error elements from pyenv.sh and now ever prompt says pyenv-virtualenv: version 2.7.13' is not a virtualenv` which I haven't been able to resolve.

my hack workaround is to add PYTHONPATH to the start script

@pyroscope
Copy link
Owner

It's unclear where and when these errors occur.

Also, using the system Python (Jessie comes with a reasonably new version) as shown in the README will likely fix this, too.

@2600box
Copy link
Author

2600box commented Jan 24, 2017

agreed. just wanted to bring it to your attention so that it may be looked at in the default ansible install.

@pyroscope
Copy link
Owner

pyroscope commented Jan 25, 2017

Which still leaves us with "no clue when and where this occurs".

@pyroscope
Copy link
Owner

No further feedback.

@2600box
Copy link
Author

2600box commented May 22, 2017

Hey. I have been looking at this again because it has been annoying me. It seems to be a syntax issue with https://github.com/pyroscope/pimp-my-box/blob/master/roles/pyenv/files/pyenv.sh
i have been trying different things, but I can't get it to stop complaining.

i tried export PYENV_DEBUG=1 and i get the following:

+ [pyenv-sh-activate:90] new_venv=2.7.13/envs/--no-error
+ [pyenv-sh-activate:91] pyenv-virtualenv-prefix 2.7.13/envs/--no-error
+ [pyenv-sh-activate:95] '[' -z '' ']'
+ [pyenv-sh-activate:96] echo 'pyenv-virtualenv: version `--no-error'\'' is not a virtualenv'
pyenv-virtualenv: version `--no-error' is not a virtualenv
+ [pyenv-sh-activate:98] echo false
+ [pyenv-sh-activate:99] exit 1

does that shed any light?

@2600box
Copy link
Author

2600box commented May 22, 2017

ok, i've been looking at these logs some more.

++ [pyenv:120] command -v pyenv-sh-activate
+ [pyenv:120] command_path=/home/rtorrent/.local/pyenv/plugins/pyenv-virtualenv/bin/pyenv-sh-activate
+ [pyenv:121] '[' -n /home/rtorrent/.local/pyenv/plugins/pyenv-virtualenv/bin/pyenv-sh-activate ']'
+ [pyenv:123] shift 1
+ [pyenv:124] '[' --no-error = --help ']'
+ [pyenv:131] exec /home/rtorrent/.local/pyenv/plugins/pyenv-virtualenv/bin/pyenv-sh-activate --no-error --verbose
+ [pyenv-sh-activate:17] '[' -z /home/rtorrent/.local/pyenv ']'
+ [pyenv-sh-activate:25] unset FORCE
+ [pyenv-sh-activate:26] unset QUIET
+ [pyenv-sh-activate:28] '[' 2 -gt 0 ']'
+ [pyenv-sh-activate:29] case "$1" in
+ [pyenv-sh-activate:49] break
+ [pyenv-sh-activate:55] no_shell=
+ [pyenv-sh-activate:56] versions=("$@")
+ [pyenv-sh-activate:57] '[' -z --no-error ']'
+ [pyenv-sh-activate:64] '[' -z 1 ']'
+ [pyenv-sh-activate:70] venv=--no-error
+ [pyenv-sh-activate:72] '[' -n '' ']'
+ [pyenv-sh-activate:85] pyenv-virtualenv-prefix --no-error
+ [pyenv-sh-activate:87] OLDIFS=' 	

leads me to https://github.com/pyenv/pyenv-virtualenv/blob/master/bin/pyenv-sh-activate
if i run /home/rtorrent/.local/pyenv/plugins/pyenv-virtualenv/bin/pyenv-sh-activate --no-error --verbose I get an error line 88: pyenv-version-name: command not found

this file does exist here: ./.local/pyenv/libexec/pyenv-version-name

should libexec be in my $PATH or is there something missing in the script?

@pyroscope
Copy link
Owner

pyroscope commented May 22, 2017

One possible cause might be that that the file changed in pyenv itself, and doesn't fit anymore.

What shell did you use for those tests?

@pyroscope pyroscope reopened this May 22, 2017
@2600box
Copy link
Author

2600box commented May 23, 2017

using bash shell from rtorrent account.

i have checked with diff that the pyenv-sh-activate and pyenv.sh do match those on github.
pyenv.sh is from august 2015. pyenv-sh-activate has had active development through 2015 and 2016...

@pyroscope
Copy link
Owner

See also #14, which will either uncover this, or show what's missing on your end.

@2600box 2600box closed this as completed Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants