0

My python project has dependencies on packages that exist on the local file system in folder X (i.e. not installed form the internet). I'd like to add these packages (source code) to the python environment for my project. How can this be done?

I've add folder X to "Search Paths" in the Solution Explorer, but I still cannot import the package.

SuperUser01
  • 199
  • 1
  • 13

1 Answers1

0
import sys
sys.path.append(package_path)
import package

I import my packages from outside in this way, you can try this way.

you can take a look also here for include your project files into the your project

  • Understood, but is there no way within VS gui to add paths (as there is in pycharm)? I'd expect this to be a somewhat standard thing to do. – SuperUser01 Dec 19 '22 at 19:59