I have some non-python dependencies that needs paths. How do you set it up?

Asked 2 years ago

I'm currently working on a project and I'm using non-python dependencies. How can I explicitly tell Python to read from a custom directory instead of the ones in the default path?

Alan Lang

Monday, October 03, 2022

There are multiple ways to go about this, but the easiest one is to import the "setuptools" libary and use certain commands. So, consider use the command "from setuptools import setup" to run the "setup()" function. With it, you can specify the dependencies and their paths manually, even if they are non-python. If this doesn't work, you can use the command "sys.path.insert()" from the "sys" module to import a file from a specific path.





Write an answer...

Cancel

Please follow our  Community Guidelines

Can't find what you're looking for?