In bundled python package installation is performed in user location
See original GitHub issueProblem
When the download and install .deb
package and try run pip install
using pip
from bundled python
there is information that the package will be installed in user
mode because site-package
is not writable.
Packages installed in user
mode will be available in all python3.8 environments and may introduce unexpected side effects.
pip bundled in app should use different location to install a new packages.
Proposed Solution
set alternative install location in user directory when run in non administrator mode and add this location to PYTHONPATH
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Installing Packages - Python Packaging User Guide - Python.org
Python “Virtual Environments” allow Python packages to be installed in an isolated location for a particular application, rather than being installed globally.
Read more >Python Package Installation on Windows - ActiveState
To manually install packages in Python with setup.py, do the following: Download the package and extract it into a local directory. Navigate to ......
Read more >How to bundle a Python application including dependencies?
Python is installed in the standard location; the package and its dependencies are installed in a separate directory (possibly site-packages); the installation ...
Read more >Packaging applications to install on other machines with Python
setuptools solves the problem of packaging your application in a nice directory structure for making scripts and libraries available to users.
Read more >Using Python's pip to Manage Your Projects' Dependencies
By chaining the packages rptree and codetiming in the pip install command, you install both packages at once. You can add as many...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m watching this issue, too, because it’s the one capability that’s necessary to make jupyterlab_app useful. (What’s Python without packages?)
As I understand the current status,
pip install X
in the JupyterLab terminal or in a notebook cell starting with!
runspip
in some global mode, putting the installed package in~/.local
, rather than in the conda environmentconda install X
in the JupyterLab terminal or in a notebook cell starting with!
doesn’t work at all because the install area is not writable.Oddly, considering this error, the
pip
andconda
commands are coming from the right place (this output came from the JupyterLab terminal; the output from a notebook cell is the same):Aha! The problem is that the site-packages is not writable, and so that’s why
pip
is deferring to~/.local
:We see where it is when uninstalling the package:
The error message from
conda
seems to be from the same underlying cause:Interestingly, the
conda
in JupyterLab_app sees my normalconda
environments:But the
conda
I use outside of JuptyerLab_app, in a normal terminal, for instance, does not see the JupyterLab_app one:If there’s some way now to
pip
andconda
into/opt/JupyterLab/resources/jlab_server
, I’d love to know it! If not, this is a bug-fix/feature-request. Thanks!(Or do I just have to install it not from the .deb? That seemed like the appropriate way to install it, as I’m an end-user, not a developer.)
If I good remember it was caused by installation outside
site-packages
. I meet this when performing installation in developer mode (pip install -e
).