skip to Main Content

I installed VSCode and its remote SSH and Python extensions.

I connected to a remote server, let’s say by ssh user_name@ip_address.

Now, in the remote server, the path the folder with the Python packages I installed long time ago is: /home/user_name/.local/lib/python3.7/site-packages.

How do I use them when I create a Python script in VSCode and, for example, try to import numpy as np?

2

Answers


  1. Press [control]+[shift]+[P] and type Python: Select Interpreter. Click the option that shows up and select the correct interpreter. Then your default environment should use that interpreter and all packages installed for it.

    Login or Signup to reply.
  2. You can add "python": "path/to/python3.7" in launch.json then use debug mode.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search