question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to import python package installed on environment

See original GitHub issue
  • VS Code Version: 1.53.2
  • OS Version: Linux x64 5.4.0-65-generic

Steps to Reproduce:

  1. create a .ipynb (saved in a remote location) with a single import (e.g. import matplotlib.pyplot as plt)
  2. open the (remote) ipynb with vs code via SSH
  3. run the code on the .ipynb -> here is where I am getting the error (ModuleNotFoundError)

To make sure the package I am trying to import on the ipynb is installed

  1. open a terminal on vs code itself
  2. call the same python interpreter previously selected on the interactive window (shown on the bottom left of the screen)
  3. call the import command -> package was successfully imported

Does this issue occur when all extensions are disabled?: NA (some extensions (e.g. python, Jupyter) cannot be disabled for this testing)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
scaomathcommented, Oct 13, 2021

@DonJayamanne I am not any more. 1.61 on MacOS and Ubuntu Linux.

1reaction
txoofcommented, Feb 21, 2022

@DonJayamanne Thanks for getting back to me on this.

I’m not able to reproduce this with the V 1.64.2 (Universal). I gave up on using a remote Jupyter kernel, but it looks like whatever was wrong (configuration? bug?) seems to be resolved at this point. If I can reliably reproduce the problem I’ll open a new ticket.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Unable to import a module that is definitely installed
Open up Terminal · Type open .bash_profile · In the text file that pops up, add this line at the end: export PYTHONPATH=$PYTHONPATH:/System/Library/Frameworks/ ......
Read more >
Failed to import python package installed on environment
Steps to Reproduce: create a .ipynb (saved in a remote location) with a single import (e.g. import matplotlib.pyplot as plt ); open the...
Read more >
ModuleNotFoundError: no module named Python Error ...
How to fix the ModuleNotFoundError in Python · 1. Make sure imported modules are installed · 2. Make sure modules are spelled correctly...
Read more >
PyCharm can't install/import a package/library/module
Try installing/importing a package from the system terminal (outside of PyCharm) using the same interpreter/environment.
Read more >
Why Can't Python Find My Modules?
A common error that new Pythonistas will come across is that the packages they think they've installed are not actually being recognized by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found