0

I have to present my application on another PC, which does not have the modules that I use already installed so I have to locally import everty pythom module that I use. I use a lot of them, like: OpenCV, TesorFlow, Keras, Kivy, sci-kit-image, etc. I discovered that all my python packages are installed in the directory site-packages, which is a part of the tree where is python installed. I want to copy-paste my site-packages directory to the other PC and import all that I need when my app has to run on the other PC. How do I set all modules from site-packages locally to be available for import in my app?

The second solution I could think of would be to download all the modules from the git and official sites, and import them into my app, but it's hard labour and I have to write a .bat file to install them... but I'm pretty sure I don't have the permission to install anything...

Is there a way for my first solution? pls I really need to know

Edit: I use python 3.6

1 Answers1

0

If you copy the whole package directory to your project directory, it should work. It then will be imported as though it is your own module.

Look at this: How does python find a module file if the import statement only contains the filename?

kenjoe41
  • 128
  • 7