How to configure the Vscode terminal?

Asked

Viewed 6,370 times

4

I am trying to configure my Vscode so that I can install libraries through the integrated terminal but I am having problems, it seems that Vscode does not "synchronize" with the standard terminal.

At first I was using virtualenv only. I created my virtual environment and when I opened my Workspace in Vscode I was able to configure the interpreter as venv created. Already the terminal enabled venv when created but ran a python 2.x, did not let me install anything for it, always complained that Pip was outdated but did not let me update Pip.

I thought the problem might be the issue of having two different python versions inside my venv so I chose to test pyenv. I reinstalled and configured everything, added the necessary commands to . bashrc and could activate my pyenv externally. In Vscode I was able to configure the interpreter (taskbar) for my created pyenv but the terminal is still not aligned with the terminal of my linux... does not accept pyenv as command and continues running in a version 2.X python.

I’m trying to solve now using the command

"terminal.integrated.env.linux":{ 
        "VSCODE_INTEGRATED_TERMINAL": "true"
    }

But when I use the command below to check, True does not appear

echo $VSCODE_INTEGRATED_TERMINAL

I tried to open the vscode straight from the directory and already tried to open as worspace and as Folder...

Has anyone ever had a problem like this with the Vscode terminal? How did you solve it?

1 answer

2


I managed to solve the problem with the help of a friend and decided to leave it on the record. I was using the wrong command in json, edited Settings.json and added the following command:

"terminal.integrated.shellArgs.linux": ["-l"]

Now the terminal is pointing directly to the main shell of my linux!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.