1

I have a custom package in a private repo. I'm able to install it with:

pip install "git+https://myserver.com/subfolders/my_repo.git#egg=my_package&subdirectory=my_package"

This works fine. I've added two extra dependencies in setup.py:

extras_require = {
    'depa' : ["another_package @ git+https://myserver.com/subfolders/my_repo.git#egg=another_package&subdirectory=another_package"],
    'depb' : ["some_other_package @ git+https://myserver.com/subfolders/my_repo.git#egg=some_other_package&subdirectory=some_other_package"],
}

I can install the extra dependencies with:

pip install -e .[depa,depb]

However, when I try to install using the package's URL, it fails:

pip install "git+https://myserver.com/subfolders/my_repo.git#egg=my_package&subdirectory=my_package"[depa,depb]
Collecting my_package
  Cloning https://myserver.com/subfolders/my_repo.git to c:\users\my_user\appdata\local\temp\pip-install-j0o9f85u\my_package
    ERROR: Error [WinError 267] The directory name is invalid while executing command python setup.py egg_info
ERROR: Could not install packages due to an EnvironmentError: [WinError 267] The directory name is invalid

Is there a way to use pip to install the package from a private URL while at the same time specifying the extras?

Thanks!!

Leonardo
  • 1,533
  • 17
  • 28
  • 1
    I'm an idiot. It's answered here: [specify extras require with pip install e](https://stackoverflow.com/a/30239714/6271889). The command line should be `pip install "git+https://myserver.com/subfolders/my_repo.git#egg=my_package[depa,depb]&subdirectory=my_package"` – Leonardo Feb 16 '21 at 21:24

0 Answers0