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

Python extension is broken #2341

Closed
abhishekkrthakur opened this issue Nov 19, 2020 · 73 comments
Closed

Python extension is broken #2341

abhishekkrthakur opened this issue Nov 19, 2020 · 73 comments
Assignees
Labels
bug Something isn't working extension The issue needs to be fixed in the extension high-priority This issue needs to be resolved ASAP
Milestone

Comments

@abhishekkrthakur
Copy link

It seems like the python interpreter cannot be selected in 3.7.1

Command 'Python: Select Interpreter' resulted in an error (command 'python.setInterpreter' not found)

@vnijs
Copy link

vnijs commented Nov 20, 2020

Things were working nicely in 3.6.2 but not in 3.7.1 or 3.7.2. With the latest version of the python extension it is trying to also load a jupyter extension and dying there.

image

@code-asher
Copy link
Member

code-asher commented Nov 20, 2020 via email

@ghost
Copy link

ghost commented Nov 21, 2020

Looks like we have another broken extension...I wonder why it works in 3.6.2 though. Maybe it's pulling a different version of the Python extension.

I think it started to break with Python 2020.11 where it separated Jupyter into a standalone extension and was dependent on it:
https://github.com/microsoft/vscode-python/releases/tag/2020.11.358366026
"Code for Jupyter Notebooks support has been refactored into the Jupyter extension, which is now a dependency for the Python extension"
The previous python (2020.10) worked for me with code-server 3.7.2.

@vnijs
Copy link

vnijs commented Nov 21, 2020

@zhizheng-1 Thanks! I can confirm that the 2020.10 version (link below) does indeed work with code-server 3.7.2

https://github.com/microsoft/vscode-python/releases/tag/2020.10.332292344

@bruwozniak
Copy link

bruwozniak commented Nov 23, 2020

The problem I believe is that you are shipping the 2020.12.0-dev version of the Jupyter extension in your extension gallery (presumably automatically built from https://github.com/Microsoft/vscode-jupyter), whereas in Microsoft's gallery the versions are different: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter, the latest one being 2020.11.372831992

@code-asher
Copy link
Member

Ahhhhhh I see. It doesn't look like they use GitHub releases or tags so our builder must just be continually building off master and breaking all the time as a consequence.

@ttthree
Copy link

ttthree commented Nov 25, 2020

Any timeline to get this fixed or is there any workaround ? :)

@code-asher
Copy link
Member

code-asher commented Nov 25, 2020 via email

@vnijs
Copy link

vnijs commented Nov 25, 2020

@ttthree I installed the latest extension versions of jupyter and python from marketplace (link below for jupyter) and that seems to work.

https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

@jhallas
Copy link

jhallas commented Dec 1, 2020

I build code-server into a Docker image I use. I got it working by first installing the python extension (which now automatically installs the 2020.12.0-dev jupyter extension mentioned above from code-server. I then install the jupyter vsix linked above with --force because it sees it as an older version. I then add "extensions.autoUpdate": false to my settings.json file so it doesn't automatically update to the incompatible version upon startup.

@code-asher code-asher changed the title Python interpreter broken in 3.7.1 Python extension broken Dec 2, 2020
@code-asher code-asher changed the title Python extension broken Python extension is broken Dec 2, 2020
@code-asher code-asher added the extension The issue needs to be fixed in the extension label Dec 2, 2020
@gogobd
Copy link

gogobd commented Dec 3, 2020

@jhallas Could you eventually share the Dockerfile you are using? I've been downgrading to 3.4.1 and for quite a long time now...

@benz0li
Copy link
Contributor

benz0li commented Dec 6, 2020

@gogobd I'm currently using the following code in a Dockerfile with code-server 3.7.4:

[...]
&& code-server --install-extension ms-toolsai.jupyter-2020.11.399280825.vsix || true \
&& code-server --install-extension ms-python.python \
[...]

See #2355 (comment) about standard bash ignore error || true.

@nhooyr nhooyr added bug Something isn't working high-priority This issue needs to be resolved ASAP labels Dec 8, 2020
@theramkm
Copy link

theramkm commented Dec 8, 2020

@jhallas Could you eventually share the Dockerfile you are using? I've been downgrading to 3.4.1 and for quite a long time now...

Hmm.. I found 3.5 to work for me!

@jhallas
Copy link

jhallas commented Dec 8, 2020

@jhallas Could you eventually share the Dockerfile you are using? I've been downgrading to 3.4.1 and for quite a long time now...

Hi, Sorry for the delay. I can't share the Dockerfile but this is what I do:

  1. Install code-server
  2. Copy in external vs code extensions
  3. code-server --install-extension (python extension)
  4. code-server --install-extension (jupyter extension) --force
  5. copy custom settings.json to /home/jovyan/.local/share/code-server/User/ with "extensions.autoUpdate": false line

@gogobd
Copy link

gogobd commented Dec 8, 2020

RUN mkdir -p ~/.local/lib ~/.local/bin
RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.7.4/code-server-3.7.4-linux-amd64.tar.gz \
  | tar -C ~/.local/lib -xz
RUN mv ~/.local/lib/code-server-3.7.4-linux-amd64 ~/.local/lib/code-server-3.7.4
RUN ln -s ~/.local/lib/code-server-3.7.4/bin/code-server ~/.local/bin/code-server
RUN PATH="~/.local/bin:$PATH"

# Fix broken python plugin # https://github.com/cdr/code-server/issues/2341
RUN mkdir -p ~/.local/share/code-server/ && mkdir -p ~/.local/share/code-server/User && echo "{\"extensions.autoCheckUpdates\": false, \"extensions.autoUpdate\": false}" > ~/.local/share/code-server/User/settings.json 
RUN wget https://github.com/microsoft/vscode-python/releases/download/2020.10.332292344/ms-python-release.vsix \
 && ~/.local/bin/code-server --install-extension ./ms-python-release.vsix || true

Thanks to the comments I found here here that made it work for me...
I fixed and edited this comment (settings.json wasn't in the right place)

@pseeth
Copy link

pseeth commented Jan 15, 2021

By any chance, is there a timetable for getting the extension working again? I really want to use code-server, but as an ML person trying to use code-server on remote GPUs, the Python extension not working is a showstopper for me. Hoping it gets fixed soon, as I'd love to use this.

@jhallas
Copy link

jhallas commented Jan 15, 2021

@pseeth I think it works even with the most recent version as long as you download the extension vsix for python and jupyter from the vs code website manually install with the considerations I listed.

@jsjoeio jsjoeio added this to the v3.9.3 milestone Mar 16, 2021
@oxy oxy self-assigned this Mar 17, 2021
@oxy oxy modified the milestones: v3.9.3, v3.9.2 Mar 17, 2021
@oxy
Copy link

oxy commented Mar 17, 2021

Hey, I think I managed to get it working - you may need to "reset" your code-server instance by removing ~/.local/share/code-server (warning: this removes any custom configuration, all extensions, and your HTTPS certs if you asked code-server to manage them!), but I just tested this myself and Python should work now, fingers crossed.

I did some manual wrangling and downgraded the Jupyter extension and upgraded the Python extension that's being served; it may break every time MS pushes a new update, but I'll force-downgrade it whenever its needed.

Closing for now!

@oxy oxy closed this as completed Mar 17, 2021
@Ki6an
Copy link

Ki6an commented Mar 17, 2021

was facing a similar issue,
by using the older version of python was able to fix the issue :
image

next, select this version 2020.10.332292344 or 2020.5.86806.

now I'm able to use pylint and debugging too

@maresb
Copy link

maresb commented Mar 17, 2021

@Ki6an it's well known that it works with 2020.10.332292344, so you shouldn't need to go that far back.

@oxy, could you please provide more details? What are the specific versions of the Jupyter and Python extensions that you're using?

@phisanti
Copy link

I totally agree with @Ki6an, but the problem is I cannot run ipython widgets in that version. More precisely, I would like to run the nglview plug-in for my work. Do you know how I could run that widget in the 2020.5.86806 version? Moreover, what is the difference between the two versions so that the 2020.5.86806 works but 2020.10.332292344 doesn't? Is there any "debug" option that we could activate to see how each version runs?

@oxy
Copy link

oxy commented Mar 18, 2021

Alright, latest versions that work for me are Python v2021.2.633441544 and Jupyter 2021.2.0 - and they should be the latest on our gallery.

@phisanti
Copy link

I have just tried Python v2021.2.633441544 and Jupyter 2021.2.0 (using code-server 3.9.1) as @oxy says and I can confirm that it works. However, I might seem a bit thick but I don't understand why. I thought that code-server depended on open-vsix and they have not released a new version, so why is that suddenly now works?

@abhishekkrthakur
Copy link
Author

doesnt work for me. im on 3.9.1 and updated python extension to 2021.2.633.....

@rushtehrani
Copy link

It's also working for me with code-server 3.9.1 and ms-python 2021.3.658691958.

@oxy
Copy link

oxy commented Mar 20, 2021

I have just tried Python v2021.2.633441544 and Jupyter 2021.2.0 (using code-server 3.9.1) as @oxy says and I can confirm that it works. However, I might seem a bit thick but I don't understand why. I thought that code-server depended on open-vsix and they have not released a new version, so why is that suddenly now works?

We were hoping that we could switch from our internal gallery to OpenVSX and then hope upstream/OpenVSX could sort out the versioning issues; but then I decided to just manually override the versions we're serving right now, since we're blocked on web extension support for OpenVSX.

I didn't expect 2021.3 to work as that depends on VSCode 1.54, which we're yet to update to.

@wzrzt
Copy link

wzrzt commented Mar 22, 2021

It's also working for me with code-server 3.9.1 and ms-python 2021.3.658691958.
May I know how to install ms-python 2021.3.658691958 into code-server 3.9.1, please?
I can't see this version on my code-server 3.9.1. And I downloaded it from vscode-extension-market and it can't be installed and told me not compitable with vscode v1.53.2.

@rushtehrani
Copy link

rushtehrani commented Mar 22, 2021

May I know how to install ms-python 2021.3.658691958 into code-server 3.9.1, please?
I can't see this version on my code-server 3.9.1. And I downloaded it from vscode-extension-market and it can't be installed and told me not compitable with vscode v1.53.2.

I went back and checked and it looks like even though I explicitly set the version to 2021.3.658691958 in my Dockerfile:

RUN code-server --install-extension [email protected]

The extension page in the IDE is showing that 2021.2.633441544 is installed:

image

So --install-extension probably fell back to the latest supported version.

The good news is 2021.2.633441544 is working.

@ddurham2
Copy link

@rushtehrani, that's probably due to #2626

@DavidTWynn
Copy link

After I set an env variable to install python3 I could install 2021.3 of the ms-python extension.

https://github.com/linuxserver/docker-mods/tree/code-server-python3
DOCKER_MODS=linuxserver/mods:code-server-python3

@gogobd
Copy link

gogobd commented Apr 23, 2021

it's weird but all the previous workarounds don't work for me any more... I get ChunkLoadError with 2020.10.332292344/ms-python-release.vsix and everything else I tried didn't work either. Is there a known working solution for docker currently?
I'm trying to get Jupyter Notebooks to work again.

@MarcSkovMadsen
Copy link

I can get ms-python v2021.5.842923320 and ms-toolsai.jupyter v2021.3.0 working.

But using the latest version ms-toolsai.jupyter v2021.5.0 does not work.

image

@gogobd
Copy link

gogobd commented Jun 2, 2021

I can get ms-python v2021.5.842923320 and ms-toolsai.jupyter v2021.3.0 working.

But using the latest version ms-toolsai.jupyter v2021.5.0 does not work.

image

Is that with 3.10.x? (I’m asking because I completely downgraded to 3.9.x because Jupyter didn’t work.)

@MarcSkovMadsen
Copy link

I can get ms-python v2021.5.842923320 and ms-toolsai.jupyter v2021.3.0 working.
But using the latest version ms-toolsai.jupyter v2021.5.0 does not work.
image

Is that with 3.10.x? (I’m asking because I completely downgraded to 3.9.x because Jupyter didn’t work.)

What is 3.10.x referring to?

@jsjoeio
Copy link
Contributor

jsjoeio commented Jun 2, 2021

What is 3.10.x referring to?

The code-server version I believe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extension The issue needs to be fixed in the extension high-priority This issue needs to be resolved ASAP
Projects
None yet
Development

No branches or pull requests