I have the following structure in git
scripts/
scripts/folder1/
scripts/folder1/module
scripts/folder1/module/setup.py
scripts/folder1/module/src/module
scripts/folder1/module/src/module/__init__.py
scripts/folder1/module/src/module/source.py
I want to install module , so I tried the following in my requirements.txt
git+https://[email protected]/repo-name/scripts.git#egg=module&subdirectory=module
but this does not seem to work and I get the following error:
IOError: [Errno 2] No such file or directory: '/private/var/folders/p_/gz96g4610fn94hz6w_l2gjyw0000gn/T/pip-build-MLhekq/module/module/setup.py
I understand that this question may have been answered at How can I install from a git subdirectory with pip? but I am looking for the exact syntax in my case.
You can deploy Git locally, or use it via a hosted service, such as Github, Gitlab or Bitbucket. One of the advantages of using pip together with Git is to install the latest commits of unreleased Python packages as branches from Github.
Install the downloaded package into a local directory : python get-pip.py --user This will install pip to your local directory (. local/bin) . Now you may navigate to this directory (cd . local/bin) and then use pip or better set your $PATH variable this directory to use pip anywhere : PATH=$PATH:~/.
Read the Docs uses pip to install your Python packages. If you have private dependencies, you can install them from a private Git repository or a private repository manager.
ok, just figured out this. For anyone who may spend hours on this
git+https://[email protected]/repo-name/scripts.git#subdirectory=folder1/module
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With