Gitpod: Python workspaces are broken

Created on 15 Nov 2019  路  14Comments  路  Source: gitpod-io/gitpod

Describe the bug
So I have a private repository that I'm opening in Gitpod, and my configuration looks like:

ports:
- port: 5000

tasks:
  - before: python3 -m pip install --upgrade -r requirements.txt

(and yes, I've tried with both init and before)

the issue is that I can now open the code, only to see:
Screenshot 2019-11-15 at 12 25 36 PM
all my external dependencies seemingly missing!

To Reproduce
Private so I can't sorry

Expected behavior
My dependencies should be in site packages

Additional Information
This only happens for external dependencies, like sentry_sdk, but not with builtins like os and package-private classes (in the project's package, meaning they are in the same folder).

Please help, this is a bit urgent as it is slowing down my workflow!

Most helpful comment

@RDIL I prepared a fix for the issue the Python LS, but will need to wait to our team with the deployment.

In the meantime to work around this, please navigate to https://gitpod.io/environment-variables/ and add the following Env Var:

key | value | scope
------------ | ------------- | -------------
PYTHONUSERBASE | /workspace/.pip-modules | */*

Screen Shot 2019-11-15 at 22 41 45

All 14 comments

Hi @RDIL! I鈥檓 sorry to hear that. Do you see the packages being installed?

Does it help to reopen the Python file after the installation is finished?

Please verify that you have set python.jediEnabled setting to false.

Hey @AlexTugarev

  1. Yes, I can see the logs
  2. No - the installation will have already completed by the time it actually opens the editor instead of the animated logo
  3. Why and how

I could reproduce it. 鈥榃orking on a fix, and will come back soon with a temporary workaround for you.

@AlexTugarev just out of interest, what is the actual issue?

The Python LS doesn鈥檛 consider the user site for its search path.

Also worth noting: pylint notes "errors" all over the place that can be fixed by simply modifying and saving the file which is getting really annoying

Also, why the hell are we using pyenv?

How about have a minimal base image for gitpod and allow users to customize their own images for workspaces?

https://github.com/gitpod-io/gitpod/issues/932

@RDIL I prepared a fix for the issue the Python LS, but will need to wait to our team with the deployment.

In the meantime to work around this, please navigate to https://gitpod.io/environment-variables/ and add the following Env Var:

key | value | scope
------------ | ------------- | -------------
PYTHONUSERBASE | /workspace/.pip-modules | */*

Screen Shot 2019-11-15 at 22 41 45

Also, why the hell are we using pyenv?

Feel free to suggest improvements on https://github.com/gitpod-io/workspace-images 馃檶

@AlexTugarev it works like a charm. Any idea when the deployment will happen?

AlexTugarev not sure why but python syntax highlighting just broke - its all white

never mind

thanks for verifying.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kittaakos picture kittaakos  路  3Comments

ColbyWTaylor picture ColbyWTaylor  路  3Comments

mouse484 picture mouse484  路  3Comments

kuniss picture kuniss  路  3Comments

akosyakov picture akosyakov  路  3Comments