-vvv option).Poetry error when private dependency (gist here https://gist.github.com/vancouverwill/490daeb4c7acec58af00396ae0f13702) . I have spent the last few hours reading poetry and pip issues but can't find the same bug.
[build-system] section of pyproject.toml$ pip install --upgrade pip==18.0.0
Collecting pip==18.0.0
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
Installing collected packages: pip
Found existing installation: pip 19.1.1
Uninstalling pip-19.1.1:
Successfully uninstalled pip-19.1.1
Successfully installed pip-18.0
$ pip install setuptools
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/site-packages (41.0.1)
You are using pip version 18.0, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ pip install -q poetry
You are using pip version 18.0, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ poetry --version
Poetry 0.12.15
$ pip --version
pip 18.0 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
$ poetry run pip install --upgrade 'pip==9.0.3'
Creating virtualenv evaluators-py3.6 in /root/.cache/pypoetry/virtualenvs
Collecting pip==9.0.3
Downloading https://files.pythonhosted.org/packages/ac/95/a05b56bb975efa78d3557efa36acaf9cf5d2fd0ee0062060493687432e03/pip-9.0.3-py2.py3-none-any.whl (1.4MB)
Installing collected packages: pip
Found existing installation: pip 18.1
Uninstalling pip-18.1:
Successfully uninstalled pip-18.1
Successfully installed pip-9.0.3
$ poetry run pip --version
pip 9.0.3 from /root/.cache/pypoetry/virtualenvs/evaluators-py3.6/lib/python3.6/site-packages (python 3.6)
$ poetry check
All set!
$ poetry install -vvv
Virtualenv evaluators-py3.6 already exists.
Using virtualenv: /root/.cache/pypoetry/virtualenvs/evaluators-py3.6
Installing dependencies from lock file
Package operations: 33 installs, 0 updates, 0 removals, 1 skipped
- Installing markupsafe (1.1.1)
- Installing numpy (1.16.3)
- Installing six (1.12.0)
- Installing atomicwrites (1.3.0)
- Installing attrs (19.1.0)
- Installing certifi (2019.3.9)
- Installing chardet (3.0.4)
- Installing click (7.0)
- Skipping colorama (0.4.1) Not needed for the current environment
- Installing idna (2.8)
- Installing itsdangerous (1.1.0)
- Installing jinja2 (2.10.1)
- Installing more-itertools (7.0.0)
- Installing pluggy (0.11.0)
- Installing py (1.8.0)
- Installing pyrsistent (0.15.2)
- Installing scipy (1.2.1)
- Installing urllib3 (1.24.3)
- Installing wcwidth (0.1.7)
- Installing werkzeug (0.15.2)
- Installing chaospy (3.0.4)
- Installing coverage (4.5.3)
- Installing entrypoints (0.3)
- Installing flask (1.0.2)
- Installing jsonschema (3.0.1)
- Installing mccabe (0.6.1)
- Installing pint (0.9)
- Installing pycodestyle (2.5.0)
- Installing pyflakes (2.1.1)
- Installing pytest (4.5.0)
- Installing requests (2.21.0)
- Installing communitymodels (0.2.0 7196dd1)
- Installing flake8 (3.7.7)
- Installing pytest-cov (2.7.1)
- Installing evaluators (0.1.0)
[EnvCommandError]
Command ['/root/.cache/pypoetry/virtualenvs/evaluators-py3.6/bin/python', '-
m', 'pip', 'install', '-e', '/builds/xxx/services/evaluation-service'] error
ed with the following output:
Obtaining file:///builds/xxx/services/evaluation-service
Complete output from command python setup.py egg_info:
error in evaluators setup command: 'install_requires' must be a string o
r list of strings containing valid project/version requirement specifiers; I
nvalid URL given
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /builds/xxx/s
ervices/evaluation-service/
You are using pip version 9.0.3, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Exception trace:
/usr/local/lib/python3.6/site-packages/cleo/application.py in run() at line 94
status_code = self.do_run(input_, output_)
/usr/local/lib/python3.6/site-packages/poetry/console/application.py in do_run() at line 88
return super(Application, self).do_run(i, o)
/usr/local/lib/python3.6/site-packages/cleo/application.py in do_run() at line 197
status_code = command.run(input_, output_)
/usr/local/lib/python3.6/site-packages/poetry/console/commands/command.py in run() at line 77
return super(BaseCommand, self).run(i, o)
/usr/local/lib/python3.6/site-packages/cleo/commands/base_command.py in run() at line 146
status_code = self.execute(input_, output_)
/usr/local/lib/python3.6/site-packages/cleo/commands/command.py in execute() at line 107
return self.handle()
/usr/local/lib/python3.6/site-packages/poetry/console/commands/install.py in handle() at line 77
builder.build()
/usr/local/lib/python3.6/site-packages/poetry/masonry/builders/editable.py in build() at line 17
return self._setup_build()
/usr/local/lib/python3.6/site-packages/poetry/masonry/builders/editable.py in _setup_build() at line 34
self._env.run("python", "-m", "pip", "install", "-e", str(self._path))
/usr/local/lib/python3.6/site-packages/poetry/utils/env.py in run() at line 536
return super(VirtualEnv, self).run(bin, *args, **kwargs)
/usr/local/lib/python3.6/site-packages/poetry/utils/env.py in run() at line 385
raise EnvCommandError(e)
install [--no-dev] [--dry-run] [-E|--extras EXTRAS] [--develop DEVELOP]
ERROR: Job failed: exit code 1
Feels like it could be similar to #997, #1049 or #826 but the error messages presented there are quite different with no refernce to the error message I am seeing Invalid url given
I have confirmed that if I remove the dependency from git section of project file and project lock that the error does not come up and also tried in CI cloning the git package to verify not permissions issue
pyproject.tomlcommunitymodels = {git = "[email protected]:private-repo-name.git", rev = "7196dd14be6a041b6ef3bc1fcad09a84456eaefd"}
poetry.lock (note empty community models)colorama = ["05eed71e2e327246ad6b38c540c4a3117230b19679b875190486ddd2d721422d", "f8ac84de7840f5b9c4e3347b3c1eaa50f7e49c2b07596221daec5edaabbd7c48"]
communitymodels = []
coverage = ["0c5fe441b9cfdab64719f24e9684502a59432df7570521563d7b1aff27ac755f", "2b412abc4c7d6e019ce7c27cbc229783035eef6d5401695dccba80f481be4eb3", ..."fc5f4d209733750afd2714e9109816a29500718b32dd9a5db01c0cb3a019b96a"]
I wondered if there was an issue with using a commit as a reference with GIT so switched to a TAG and no luck there either
communitymodels = {git = "[email protected]:RED/communitymodels.git", tag = "0.2.0"}
still showing empty hash in poetry lock
communitymodels = []
I have the exact same issue. I managed to open the setup.py that's created by the poetry install command.
This part looks like the culprit:
package_data = \
{'': ['*']}
install_requires = \
['jsons>=0.8.9,<0.9.0',
'repo @ ' # <- This line is missing a comma
'[email protected]:user/repo.git@master']
setup_kwargs = {
'name': 'test-package',
Seems like there is a bug in whatever script is generating this file
This is a blocking issue if you're using dependencies from github repositories. Can't upgrade past 0.12.13. Having to pin poetry install pip install poetry==0.12.13 in my docker builds to keep things from breaking.
On my laptop had to poetry self:update 0.12.13.
I was able to solve this issue for myself with help from #835 . Instead of
private-dependency = {git = "git@private-repo:someorg/private-repo-name.git,
I used
private-dependency = {git = "ssh://git@privaterepo/someorg/private-repo-name.git"}.
Note the / in place of : in between the repo and org.
Thanks @Heliozoa your solution worked for me, weirdly I was not seeing this issue even with a git dependency without the ssh:// format, renamed my project/module and started to see it it locally but at the same time my CI build which is also running poetry 0.12.17 was not having any issue :man_shrugging:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.
I can confirm that the problem still persists with version 1.0.0 and the solution of @Heliozoa is still a valid workaround (thanks!). Maybe a hint in the documentation is the quickest approach to prevent users to run into this problem (as update worked but install failed, I was looking for different causes)
This should be specified in the documentation! Thanks @Heliozoa
Most helpful comment
I was able to solve this issue for myself with help from #835 . Instead of
private-dependency = {git = "git@private-repo:someorg/private-repo-name.git,I used
private-dependency = {git = "ssh://git@privaterepo/someorg/private-repo-name.git"}.Note the / in place of : in between the repo and org.