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

ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv. #1997

Closed
tekumara opened this issue Oct 14, 2020 · 4 comments
Labels
language: python meta: stale This issue/PR is stale and will be closed soon type: bug Something isn't working

Comments

@tekumara
Copy link

Describe the bug

Not able to install python packages inside a virtualenv.

Steps to reproduce

  1. Open https://gitpod.io/#https://github.com/tekumara/typed-cookie
  2. Source the venv: . venv/bin/activate
  3. pip install pytest

Expected behavior

The python package is installed into the virtualenv

Additional information

(venv) gitpod /workspace/typed-cookie $ pip install pytest
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
WARNING: You are using pip version 20.2.1; however, version 20.2.3 is available.
You should consider upgrading via the '/workspace/typed-cookie/venv/bin/python3 -m pip install --upgrade pip' command.

Example repository

https://github.com/tekumara/typed-cookie

@corneliusludmann
Copy link
Contributor

In Gitpod, the environment variable PIP_USER is set to yes. That's why it runs pip with the user flag --user which does not work in a virtualenv. As a workaround, you could run

$ export PIP_USER=false

and pip install ... in a virtualenv works again.

@corneliusludmann corneliusludmann added type: bug Something isn't working language: python labels Oct 14, 2020
@AlexTugarev
Copy link
Member

@tekumara please make sure to store the packages of your virtual envs under /workspace, in order to preserve them at workspace restart, or for prebuilds.

currently, only the /workspace location is backed up. this limitation will be removed in a future release.

@svenefftinge
Copy link
Member

Has this issue been resolved and can be closed?

@stale
Copy link

stale bot commented Mar 17, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Mar 17, 2021
KhalidCK added a commit to KhalidCK/jiradata that referenced this issue Apr 13, 2021
ajhalili2006 pushed a commit to ajhalili2006/mega-linter that referenced this issue Oct 24, 2021
For context, see gitpod-io/gitpod#1997.

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
ajhalili2006 pushed a commit to ajhalili2006/mega-linter that referenced this issue Dec 1, 2021
For context, see gitpod-io/gitpod#1997.

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
ajhalili2006 pushed a commit to ajhalili2006/mega-linter that referenced this issue Dec 11, 2021
For context, see gitpod-io/gitpod#1997.

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language: python meta: stale This issue/PR is stale and will be closed soon type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants