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

Clear pythonfinder cache after Python install #3287

Merged
merged 2 commits into from Nov 23, 2018
Merged

Clear pythonfinder cache after Python install #3287

merged 2 commits into from Nov 23, 2018

Conversation

greysteil
Copy link
Contributor

@greysteil greysteil commented Nov 22, 2018

The issue

After a new Python version was installed by pyenv it was never found, because the old Pythons were cached.

The fix

Bust the cache after installing a new Python.

The checklist

  • Associated issue (fixes Pyenv support broken since version 2018.10.09 ? #3136 again)
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

@techalchemy
Copy link
Member

Thanks!

@techalchemy techalchemy merged commit 5446935 into pypa:master Nov 23, 2018
@asmaier
Copy link

asmaier commented Dec 3, 2018

With pipenv, version 2018.11.26 I still see this behaviour:

$ pipenv install --dev
Warning: Python 3.6.5 was not found on your system…
Would you like us to install CPython 3.6.5 with pyenv? [Y/n]: Y
Installing CPython 3.6.5 with pyenv (this may take a few minutes)…
✔ Success! 

Warning: The Python you just installed is not available on your PATH, apparently.

At first it fails to recognise that Python 3.6.5 is already installed and available via pyenv. And second it then cannot find the installed version and stops the installation. Is this the issue that will be fixed by this commit discussed here?

@greysteil greysteil deleted the clear-pythonfinder-cache-after-python-install branch December 3, 2018 10:30
@greysteil
Copy link
Contributor Author

Yes! This should now be fixed - are you using 2018.11.26?

@asmaier
Copy link

asmaier commented Dec 3, 2018

Yes, I do. I just upgraded to the newest version with

brew upgrade pipenv pyenv

on Mac OS X 10.14.1.

$ pipenv --version
pipenv, version 2018.11.26
$ pyenv --version
pyenv 1.2.8

@greysteil
Copy link
Contributor Author

Huh, and you're still seeing the problem with that setup? In that case I've no idea - it works for me on a relatively clean Docker container 🤔

@asmaier
Copy link

asmaier commented Dec 3, 2018

I also set the environment variable

$ env | grep pyenv
PYENV_ROOT=/Users/<myusername>/.pyenv

But pipenv refuses to interoperate with pyenv.

@techalchemy
Copy link
Member

https://github.com/sarugaku/pythonfinder/pull/51/files#diff-963a50d451b089be9e0d078b9665eb01R91 will introduce a cleaner interface for clearing caches going forward

@techalchemy
Copy link
Member

notably it also cuts runtimes down to ~1s

@kaprests
Copy link

With pipenv, version 2018.11.26 I still see this behaviour:

$ pipenv install --dev
Warning: Python 3.6.5 was not found on your system…
Would you like us to install CPython 3.6.5 with pyenv? [Y/n]: Y
Installing CPython 3.6.5 with pyenv (this may take a few minutes)…
✔ Success! 

Warning: The Python you just installed is not available on your PATH, apparently.

At first it fails to recognise that Python 3.6.5 is already installed and available via pyenv. And second it then cannot find the installed version and stops the installation. Is this the issue that will be fixed by this commit discussed here?

I also get this, but works as expected when reverting to version 2018.7.1.

@ghost ghost mentioned this pull request Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pyenv support broken since version 2018.10.09 ?
4 participants