'properly executing single line in vs code python

hello this is sth simple probably but I want to execute my python code line by line in vs code

I am executing the same code without problem in jupiter notebook

I do it by pressing Shift + Enter after selecting line

Now a problem

I have a very simple code

import numpy
import juliacall

When I invoke run code (ctrl + alt + n) no problem with that all works Hovewer when I try to invoke it line by line numpy do not give any problem but juliacall does not imports and gives

ModuleNotFoundError: No module named 'juliacall'

specs

Ubuntu

Python 3.10



Solution 1:[1]

You have to install juliacall first, for example via pip3 install juliacall.

Solution 2:[2]

I think you have to import juliacall as from juliacall import Main if you have already installed juliacall see documentation here

Solution 3:[3]

ok I figured it out my mistake I used wrong interpreter I needed to press ctrl+shift+p python select interpreter

set it to the one on which pip operations were conducted

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 linuskmr
Solution 2 abc bcd
Solution 3 Jakub Mitura