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

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 #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 #.
@greysteil greysteil force-pushed the greysteil:clear-pythonfinder-cache-after-python-install branch from 47408b3 to 16f6ab1 Nov 22, 2018
@techalchemy
Copy link
Member

@techalchemy techalchemy commented Nov 23, 2018

Thanks!

@techalchemy techalchemy merged commit 5446935 into pypa:master Nov 23, 2018
0 of 2 checks passed
0 of 2 checks passed
pipenv CI (Linux) in progress
Details
pipenv CI (Windows) queued
Details
@asmaier
Copy link

@asmaier 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 greysteil:clear-pythonfinder-cache-after-python-install branch Dec 3, 2018
@greysteil
Copy link
Contributor Author

@greysteil greysteil commented Dec 3, 2018

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

@asmaier
Copy link

@asmaier 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

@greysteil greysteil commented Dec 3, 2018

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 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

@techalchemy techalchemy commented Dec 4, 2018

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

@techalchemy
Copy link
Member

@techalchemy techalchemy commented Dec 4, 2018

notably it also cuts runtimes down to ~1s

@kaprests
Copy link

@kaprests kaprests commented Dec 27, 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?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants