I started using Python to automate the repetitive tasks that I have at work, and often I need to integrate links to third-party modules into my scripts. How can I include these files with my scripts directly? I know that there are ways to install libraries centrally in my python installation folder (C: \ Python27). Many third-party modules provide an EXE installer that will do this automatically. However, I am concerned about how this will affect the portability of my scripts. For example, if I send my script to someone else, I also do not want to send them a list of all the individual modules that they need to download and install.
Update
I have a lot more experience with a C # project in Visual Studio. In a visual studio project, if I want to use a third-party DLL, I simply include this DLL in my solution in the Lib folder and refer to this DLL from my project. I don't want to load this library into the GAC, which seems to me like the .NET equivalent for installing the python package.
Is there any possibility, can I just include third-party libraries in my project folder and reference them using a relative path? Let's say I had the following file structure.
\My Script.py \lib\3rdPartyLib\3rdPartyLib.py
Can I import 3rdPartyLib from MyScript.py?
import 3rdPartyLib from \lib\3rdPartyLib\ ??????
Why don't I want to do this?
source share