Skip to content Skip to sidebar Skip to footer

Install A Python Package/module From Github In Local Folder An Use It

Issue I would like to install with pip3 a python module from github into a local folder named local_lib/ and then use it in a script, without any virtualenv. Context Here is my fol

Solution 1:

You have to tell Python that it has to look in local_lib for modules. E.g. by adding it to sys.path in your script (before importing from it) or by adding it to your PYTHONPATH environment variable.

Solution 2:

For this, you can just download the path.py file into your local_lib folder and your path.py use case should work. You don't need install it with pip3.

Should you want path.py to be available for scripts in any folder on the machine, using the same syntax, use the solution from Roland Smith or install it the generic way with pip install path.py.

Post a Comment for "Install A Python Package/module From Github In Local Folder An Use It"