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

non-functional pip after using "New Python Installation" option, even after switching to another version #14192

Closed
christopheranderson opened this issue Feb 8, 2021 · 2 comments · Fixed by #14506

Comments

@christopheranderson
Copy link

  • Azure Data Studio Version:
    Version: 1.25.2 (user setup)
    Commit: 4d4917d
    Date: 2021-01-20T22:52:13.492Z
    VS Code: 1.48.0
    Electron: 9.3.0
    Chrome: 83.0.4103.122
    Node.js: 12.14.1
    V8: 8.3.110.13-electron.0
    OS: Windows_NT x64 10.0.19042

Steps to Reproduce:

  1. With a fresh install of 1.25.2, setup Notebooks and choose "Python 3" kernel. Upon intitial setup, choose "New Python Installation" and proceed through all the steps in the affirmative until Jupyter is started.

  2. In a cell, type !pip --version and run the cell. This should result in no output.

  3. If you !echo %PATH%, you should see a path that ends with "azuredatastudio-python\0.0.1\Scripts

  4. Navigate to that directory with a cmd window and attempt to run .\pip.exe --version. You should see output like so:

    ~\azuredatastudio-python\0.0.1\Scripts> .\pip3.6.exe --version
    Fatal error in launcher: Unable to create process using '"c:\python-3.6.6-win-x64-0.0.1-offline\0.0.1\python.exe"  
    "C:\Users\chrande\azuredatastudio-python\0.0.1\Scripts\pip3.6.exe" --version'
    

    This would indicate that the out of the box version of pip installed is broken based on some bad hardcoded path of Python, maybe?

  5. Attempt to switch back to a different install

  6. Attempt steps Add additional readme content #2-3 and note that the path with the corrupted version of pip still takes precedence

  7. If you run !python -m pip install --upgrade pip, from your notebook, it will overwrite the bad version of pip.exe and things will work, though it is still using the wrong version of Python after swapping.

I also attempted pip3.exe and pip3.6.exe and other pip commands with similar errors.

Expected behavior:

  • Out of the box pip should work
  • Errors should be rendered to notebook
  • When I change installation, "managed" version of python/pip should not be in the PATH
@chlafreniere
Copy link
Contributor

@lucyzhang929 can you take a look here?

@lucyzhang929
Copy link
Contributor

lucyzhang929 commented Mar 3, 2021

Hi @christopheranderson,

The issue with pip not working will be fixed in the PR above.

As for the other two issues mentioned, I have created two new Github issues to track them separately:
#14538
#14539

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants