How to install library from gitlab
I need to install one package to the docker-compose based environment of the application. The package is not downloaded on pip, therefore, I install it via GitLab URL. I can successfully install it on venvs I created to test the package, but when I try to install it on the docker-compose app I start to get mistakes. That's how it looks in the requirments.txt file:
git+https://git.somerepo.com/smth/smth/package-name.git#egg=package_name
When I try to install I receive an error message:
Running command git clone -q +https://git.somerepo.com/smth/smth/package-name.git /tmp/pip-install-kqlwiux8/package-name_2ba6c558a2e14343acef3f3e34d49f18
fatal: could not read Username for 'https://git.somerepo.com': No such device or address
If i change the requirement to git@git.somerepo.com/smth/smth/package-name.git#egg=package_name it doesn't recognized as a requirement.
When I try to install it from the terminal with the command:
docker-compose --project-name=some_backend_api -f docker/dev/docker-compose.yml run core /bin/bash -c 'pip install git+https://git.somerepo.com/smth/smth/package-name.git#egg=package_name'
I receive the result that the package is successfully installed:
Successfully built package-name
Installing collected packages: pandas, package-name
Successfully installed pandas-1.3.4 package-name-0.1.0
But when I check pip list:
docker-compose --project-name=some_backend_api -f docker/dev/docker-compose.yml run core /bin/bash -c 'pip list
I couldn't find the package-name and couldn't access it When I rebuild the containers, I once again encounter the git fatal error. What might be the reason for this git fatal error, and why I couldn't find the package inside the pip list, after successfully installing it via terminal?
Please sign in to leave a comment.