[Jupyter image] Fix installations to be done by notebook user #937
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We noticed that when we installing certain packages (like
nuclio-jupyter
) that are already installed pip doesn't remove the old installationAlso when trying to manually uninstall them we got permission errors
The permission error happened because we're running the
pip install
in the docker file under the root user, and not the notebook user - fixed thatAfter some more playing with it I found out that pip doesn't automatically uninstall the package only on the first time and only when we're installing from git (i.e. just doing
pip intsall
to some older version does uninstall the old (newer) version, doing another installation after the first one from git does uninstall the old installation)not sure what's the cause for thisafter some help from @AlonMaor14 we found the reason - pip does not uninstall the old package is that when it pulls the code from git it checks its version - the version is the same as I have locally, so pip decides that no installation of the new code is actually needed and just use the old code 馃う , you can see it by adding-vvv
to thepip install
When I bumped the package version in my branch, everything worked like charm..
Another way to workaround it is adding
-U
topip install