Jump to content

Installing the Visual Studio Code on Linux - how to do that!?


dil_bert

Recommended Posts

Installing the Visual Studio Code on Linux - how to do that!?


the well known open source code editor Visual Studio Code is becoming more and more well known.


the question is: how to install Visual Studio Code in Ubuntu and  - even more interesting in many other Linux distributions. Ubuntu is not the only Linux-system it is only a very very little part of the linux world. by releasing Visual Studio Code for all major desktop platforms that includes Linux as well the Coding Community was enlighted and yes: they are very happy.. The Visual Code became more and more famous - and during the time one of the best open source code editors.

To sume up: The feature it provides are useful not only to web developers but for other languages too.

I am not going to list the features of Visual Studio Code here. 
Zhe question is: how to install Visual Studio Code on Ubuntu and other Linux distributions.


the idea 1. Install Visual Studio Code in Linux using Snap
visual Studio Code is available as a Snap package. theUbuntu users can find it in the Software Center itself and install it in a couple of clicks.

Visual Studio Code in Ubuntu Software Center  - but again: ubuntu is not the only linux - only one of many many distributions.  The Idea of using snap is somewhat strange. Snap packaging means you can install it in any Linux distribution that supports Snap packages. Make sure to enable Snap support on your Linux distribution. if we are on a certain linux-system then we can then install VS Code using this command:

sudo snap install code --classic

idea 2. Using the .deb/.rpm installation files:  the good thing: the developer of the VSCode provides packages to install Visual Studio Code in Linux. 
To go this way seems to be pretty easy: 

Just head over to the download page of Visual Studio Code and you’ll find the .deb and .rpm files (for Fedora systems)
 options under Linux. But what about the very intersting MX-Linux!?

Link to comment
Share on other sites

hello again;)

 

hello dear phpfreaks - again me - dil_bert: 

there were many options to rin VSCode under Linux. But what about the very intersting MX-Linux!?

i would love to hear from you - what are your experiences and what were your steps. 
Which extensions do you use - and how do you manage to prepare VSCode to  work with

a. PYthon 
b. MicroPython

here we need certain plugins and extensions - here we have to set up the environment. 

How do we do that!?

Link to comment
Share on other sites

hi @ all - good day dear friends, 

 

well - here some more findings: ideas and tipps for the setup of VSCode on MXlinux. 

some additional ideas regarding the powerful editor  VSCode that i want to make ready to run with Python -(and MicroPython)

why do we need a virtual environment in the Python development with VSCode


how to make Python work well in the VSCode-editor.

VS Code it is a powerful multi-language editor that is pretty similar to Atom and also to Sublime Text. To make it work with Python we have to enter some settings: we should make sure that python and pip work from our command line, before we start the installation-process. This has got a great impact on the following steps: In fact it will make the setup in editor and stuff like the setting and configurinig of the very important virtual environment alot easier.

 

here i rely on a great thread - found on the pyhon-developer-page: https://python-forum.io/Thread-VS-Code-from-start?highlight=VSCode

many thanks @snippsat: for the great hints he gave to us all

 


Python 3.6/3.7 and pip installation under Windows

C:\code
λ python -V
Python 3.7.0
 
C:\code
λ pip -V
pip 18.0 from c:\python37\lib\site-packages\pip (python 3.7)
Linux if python3 point to Python 3 use that in setup later.
	

We need that because with a a virtual environment  we are able to Start VS Code literally from any folder on the whole machine,

eg for a virtual environment
With code . from command line in any folder will open files in that folder in VS Code.
Example with virtual environment that build into Python venv

 

# Make
E:\div_code
λ python -m venv my_env
 
# cd in
E:\div_code
λ cd my_env
 
# Activate
E:\div_code\my_env
λ E:\div_code\my_env\Scripts\Activate
 
# Test pip
(my_env) E:\div_code\my_env
λ pip -V
pip 10.0.1 from e:\div_code\my_env\lib\site-packages\pip (python 3.7
 
# Install required package 
(my_env) E:\div_code\my_env
λ pip install requests
Collecting requests


 

to start the VS-Code: 

# Start VS Code
(my_env) E:\div_code\my_env
λ code .

so now we have a setting that is very powerful: 

it automatically find Python interpreter in virtual environment.
So if we push run button it will use Python version in the so called virtual environment.

 

again': here i rely on a great thread - found on the pyhon-developer-page: https://python-forum.io/Thread-VS-Code-from-start?highlight=VSCode

 

one question: this was a setup and configuration-text that is based on windows

Well i want to run VSCode in MX-Linux - which is debian based. Guess that i can give it a try 
and i can install VSCode on the MX-Linux. 


conclusio; i will give it a try and come back here and report all the findings.


regards dil_bert

Edited by dil_bert
Link to comment
Share on other sites

13 hours ago, dil_bert said:

here i rely on a great thread - found on the pyhon-developer-page: https://python-forum.io/Thread-VS-Code-from-start?highlight=VSCode

This begs the question, "Why the phuk are you boring us to death here, on what is basically a PHP site, with all this Python stuff when you could be doing it to the members of "python-forum.io?"

  • Like 1
Link to comment
Share on other sites

hi dear Barand 

 

as allways - i am happy to hear from you - okay why Pyhton is interesting to me.  I guess that there are many many ideas & things to mention here.  I like Python for its cristal clear structure and the options of doing rapid prototyping. 

 

For the web  - i love PHP and MySQL 

but for things like programming Microcontroller like ESP8266 and ESP32 ... i love using  MicroPython. 

 

to reccommend the pthon-forum - this is a good idea . thanks for that. 

Above all: i am very very glad to be here - since this site has got such a broad variety of topics that are covered

in other words: here a broad range of topics were discussed and we re able to exchange ideas, tipps and knowledge in so many fields. This is a extraordinary place. 

i am really happy to be here. 

 

keep up the great work - it rocks - and a specal thanks to you dear Barand for all your engagement and your encouraging in so many ways and times .. 

 

i am so glad to be here. 

 

regards 

Dil_bert;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.