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

Unable to automatically install library due to spaces in username when using Gitbash #11399

Closed
niceguyneo opened this issue Apr 24, 2020 · 18 comments
Labels
bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release

Comments

@niceguyneo
Copy link

Issue Type: Bug

When trying to install 'rope' to rename functions the command below is run which errors due to spaces in the username 'firstname lastname':

 & i:/#Data/#Dev/Python/DuplicateFinder/venv-dup-finder/Scripts/python.exe c:\Users\firstname lastname\.vscode\extensions\ms-python.python-2020.4.74986\pythonFiles\pyvsc-run-isolated.py pip install -U rope

Extension version: 2020.4.74986
VS Code version: Code 1.44.2 (ff915844119ce9485abfe8aa9076ec76b5300ddd, 2020-04-16T16:33:57.013Z)
OS version: Windows_NT ia32 10.0.18363

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Apr 24, 2020
@karthiknadig karthiknadig self-assigned this Apr 27, 2020
@karthiknadig karthiknadig added needs PR regression Bug didn't exist in a previous release labels Apr 27, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 27, 2020
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Apr 27, 2020
@karthiknadig karthiknadig added important Issue identified as high-priority and removed P0 labels Apr 27, 2020
@karthiknadig
Copy link
Member

@prithvikin Try the insiders build. It has a fix for this.

@luabud luabud removed the important Issue identified as high-priority label Jun 2, 2020
@ahaq0
Copy link

ahaq0 commented Sep 7, 2020

Have the same issue and on the insiders build it still appears.

@prithvikin
Copy link

prithvikin commented Sep 7, 2020

@ahaq0 That's funny, I switched to insiders build and then back to the default and it seemed to fix it. I uninstalled the insiders build too, but I am not sure what caused/fixed the issue. Sorry if this doesn't help!

@ahaq0
Copy link

ahaq0 commented Sep 7, 2020 via email

@prithvikin
Copy link

prithvikin commented Sep 7, 2020

@ahaq0 To be frank, I'm not sure. I'm no where close to being qualified to comment on doing a clean install, but I didn't have to. I know it was really frustrating when I was trying to fix the issue. Maybe try PyCharm instead of VSCode? The clean install should the a last resort.

@karthiknadig
Copy link
Member

@ahaq0 Can you confirm you are using the latest version of the extension? Also, can you confirm that you are having an issue installing python packages?
You should not have to re-install Windows. At most you can run the command to install the any particular library you need. I also verified that this issue is resolved in the latest version of the extension.

@ahaq0
Copy link

ahaq0 commented Sep 10, 2020

Hi, yep the version is 2020.8 108011. Also, correct, I ended up installing pylint manually to alleviate the issue temporarily. I can try reinstalling VS Code and removing sync to reproduce the issue if you like.

@karthiknadig
Copy link
Member

@ahaq0 Thank you, for helping address this. If you are able to reproduce it, please capture the command line and the error that you get. You should be able to see the command that was run and the error, in either the terminal or output > Python. Also share any particular environment details like path where the extension is installed, target location where the library was supposed to be installed, etc.

@ahaq0
Copy link

ahaq0 commented Sep 15, 2020

Please see here

Linter 'pylint' is not installed. Please install it or select another linter".
Error: Module 'pylint' not installed.
Error 2020-09-14 21:37:19: stderr jediProxy Error (stderr) c:\Users\ammar.vscode\extensions\ms-python.python-2020.8.108011\pythonFiles\completion.py:584: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).get_names instead.
jedi.api.names(

Python interpreter path: c:\Users\ammar\OneDrive\Documents\Github\djangoSub\venv\Scripts\python.exe

c:\Users\ammar\OneDrive\Documents\Github\djangoSub\venv\Scripts\python.exe c:\Users\ammar.vscode\extensions\ms-python.python-2020.8.108011\pythonFiles\pyvsc-run-isolated.py -c "import pip"
c:\Users\ammar\OneDrive\Documents\Github\djangoSub\venv\Scripts\python.exe c:\Users\ammar.vscode\extensions\ms-python.python-2020.8.108011\pythonFiles\pyvsc-run-isolated.py -c "import pip"
c:\Users\ammar\OneDrive\Documents\Github\djangoSub\venv\Scripts\python.exe c:\Users\ammar.vscode\extensions\ms-python.python-2020.8.108011\pythonFiles\pyvsc-run-isolated.py -c "import pylint"

Path
C:\Program Files\Python38\Scripts
C:\Program Files\Python38
C:\Python38\Scripts
C:\Python38
( added this ) C:\Users\ammar\AppData\Roaming\Python\Python38\Scripts

Extension installed
c:\Users\ammar.vscode\extensions\ms-python.python-2020.8.108011

@ahaq0
Copy link

ahaq0 commented Sep 22, 2020

Is there any information I failed to include?

@karthiknadig
Copy link
Member

@ahaq0 I don't see any spaces in the username. For the logs, I will need the command line that was used by the extension to try and install pylint. The logs above show extension trying to find if pylint is installed, if it can't find it and you are using jedi as language server, you will see a prompt. If the installation via the prompt is failing then there should be logs at show what failed. Please share the entire output > Python content.

@Kronen
Copy link

Kronen commented Oct 1, 2020

My problem was that I was using git bash (windows) as the terminal and vscode doesn't translate the backslashes.

@ahaq0
Copy link

ahaq0 commented Oct 1, 2020 via email

@Kronen
Copy link

Kronen commented Oct 2, 2020

@ahaq0 I just executed the command manually with slashes in git bash (or with backslashes in the cmd), but you can just set cmd by default momentarily for this too.

@gricn
Copy link

gricn commented Dec 30, 2020

My problem was that I was using git bash (windows) as the terminal and VSCode doesn't translate the backslashes.

That's the root of the problem. After changing the default shell to CMD, everything works fine.

@ZeldOcarina
Copy link

My problem was that I was using git bash (windows) as the terminal and VSCode doesn't translate the backslashes.

That's the root of the problem. After changing the default shell to CMD, everything works fine.

Yeah this has worked for me too! Quick and easy!!! :)

@curious-33
Copy link

I've had the similar problem. After changing git bash to windows default cmd, it worked fine

@karrtikr karrtikr changed the title Unable to automatically install pylint / rope due to spaces in username Unable to automatically install library due to spaces in username when using Gitbash Sep 21, 2021
@github-actions github-actions bot removed the needs PR label Aug 9, 2022
@karrtikr karrtikr added the needs PR Ready to be worked on label Aug 9, 2022
@luabud
Copy link
Member

luabud commented Dec 19, 2023

Our built-in support to Python tools has been deprecated in favour of linting and formatting extensions, hence closing this. These extensions already come with a version of the linter or formatter built-in (so you don't need to install them in your environment if you don't want to):

@luabud luabud closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2023
@github-actions github-actions bot removed the needs PR Ready to be worked on label Dec 19, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug regression Bug didn't exist in a previous release
Projects
None yet
Development

No branches or pull requests

10 participants