Unable to import 'x' - ModuleNotFoundError

Hey,

I’m currently completing mosh’ python course and I’m currently at Publishing Packages (s10 e8), and I’ve created my own package which has been uploaded to Pypi (btapdf2 · PyPI), but when I install it into my original project it returns the errors of;

In the output

  • Unable to import ‘btapdf2’ pylint(import-error) [1,1]
  • Import “btapdf2” could not be resolved Pylance(reportMissingImports) [1,8]

In the Terminal
Traceback (most recent call last):
File “d:\Coding\VS Code\Mosh Academy\Python\app.py”, line 1, in
from btapdf2 import text2pdf
ModuleNotFoundError: No module named ‘btapdf2’

When I run pipenv graph, it is listed there, it is also listed in the Pipfile & locked version.

How do I proceed?

Make sure that you are selecting the Virtual environment where you have installed the package.