Steps to install and setup VSCode on EndeavourOS

hello dear Commuinty

i want to install and setup VSCode on Endeavor -

are the following steps enough - and sufficient to get a full and correct setup?

To install VSCode on EndeavourOS and set up a Python development environment, we can follow these steps:

first we have to open a terminal and update the package list by running the following command:

sudo pacman -Syu

Install the Visual Studio Code package using pacman:

sudo pacman -S code

Install the Python extension for Visual Studio Code. Open VSCode, we have to click on the Extensions icon on the left sidebar, search for “Python”, and install the extension by the Microsoft-company.

We can install Python on our system. EndeavourOS comes with Python pre-installed, but we can check the version by running the following command:

python --version

If we need to install a different version or a specific package, we can use pacman or the pip package manager.

Create a virtual environment for your Python projects. This step is optional, but it’s a good practice to isolate our project dependencies. To create a virtual environment, navigate to our project folder and run the following command:

python -m venv venv

This will create us a folder named “venv” that contains the Python interpreter and pip packages for your project.

Activate the virtual environment by running the following command:

source venv/bin/activate

we should see the name of your virtual environment in the terminal prompt.

We can install any packages or libraries that your project requires. we can use pip to install packages from the Python Package Index (PyPI). For example, to install the NumPy library, we run the following command:

pip install numpy

now we can open our project folder in Visual Studio Code and start coding! You should see the Python extension in action, providing syntax highlighting, code completion, and other useful features.

That’s it! With these steps, we should have a working Python development environment with Visual Studio Code on EndeavourOS

Why don’t you use one of the open source versions? VSCodium comes to mind.

1 Like

hi there - great idea.
yes youre right.

1 Like

code is one of the open source versions.

1 Like

good day dear Dalto - good day dear Locutus

one question regarding the setup

is creating the venv the better or conda?

the manual notes;

Creating environments

Using the Create Environment command
From within VS Code, you can create local environments, using virtual environments or Anaconda, by opening the Command Palette (Ctrl+Shift+P), start typing the Python: Create Environment command to search, and then select the command.

The command presents a list of environment types: Venv or Conda.

a. creating an environment using Venv, the command presents a list of interpreters that can be used as a base for the new virtual environment.

b. creating an environment using Conda, the command presents a list of Python versions that can be used for the project.

which method is more appropiate?

By the way: We also could do it on terminal - this is also an option?

I started with code but realized that I could not install or even find some extensions on the marketplace. I took me a while until I found out that’s due to the OSS version. I now use visual-studio-code-bin. So if you don’t mind NOT using the OSS version I recommend the official client.

Or try the solution described here - but I did not test this.

And I recommend indent-rainbow extension :wink:

1 Like

You can also modify some files to get Code OSS (code) using the MS marketplace. The AUR packages code-marketplace and code-features do that for you.