-vvv option).Doing the following:
git clone https://github.com/sdispater/poetry && cd poetry
poetry install
Poetry fails to install black 18.6b4 with this error using -vvv:
```Using virtualenv: /home/dimitris/.cache/pypoetry/virtualenvs/poetry-py3.6
Installing dependencies from lock file
Package operations: 8 installs, 0 updates, 1 removal, 53 skipped
[VenvCommandError]
Command ['pip', 'install', '--no-deps', 'black==18.6b4'] errored with the following output:
Collecting black==18.6b4
Could not find a version that satisfies the requirement black==18.6b4 (from versions: )
No matching distribution found for black==18.6b4
Exception trace:
/home/dimitris/.local/lib/python3.6/site-packages/cleo/application.py in run() at line 94
status_code = self.do_run(input_, output_)
/home/dimitris/.local/lib/python3.6/site-packages/poetry/console/application.py in do_run() at line 88
return super(Application, self).do_run(i, o)
/home/dimitris/.local/lib/python3.6/site-packages/cleo/application.py in do_run() at line 197
status_code = command.run(input_, output_)
/home/dimitris/.local/lib/python3.6/site-packages/poetry/console/commands/command.py in run() at line 77
return super(BaseCommand, self).run(i, o)
/home/dimitris/.local/lib/python3.6/site-packages/cleo/commands/base_command.py in run() at line 146
status_code = self.execute(input_, output_)
/home/dimitris/.local/lib/python3.6/site-packages/cleo/commands/command.py in execute() at line 107
return self.handle()
/home/dimitris/.local/lib/python3.6/site-packages/poetry/console/commands/install.py in handle() at line 50
return installer.run()
/home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/installer.py in run() at line 76
self._do_install(local_repo)
/home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/installer.py in _do_install() at line 286
self._execute(op)
/home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/installer.py in _execute() at line 294
getattr(self, "_execute_{}".format(method))(operation)
/home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/installer.py in _execute_install() at line 319
self._installer.install(operation.package)
/home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/pip_installer.py in install() at line 76
self.run(args)
/home/dimitris/.local/lib/python3.6/site-packages/poetry/installation/pip_installer.py in run() at line 91
return self._venv.run("pip", *args, *kwargs)
/home/dimitris/.local/lib/python3.6/site-packages/poetry/utils/venv.py in run() at line 274
raise VenvCommandError(e)
The issue is that pip2 doesn't find the version 18.6b4
```bash
/usr/bin/pip2 install -U black==18.6b4
Collecting black==18.6b4
Could not find a version that satisfies the requirement black==18.6b4 (from versions: )
No matching distribution found for black==18.6b4
Pip3 does find the version:
/usr/bin/pip3 install -U black==18.6b4 1 master
Collecting black==18.6b4
Using cached https://files.pythonhosted.org/packages/4e/b5/575cdaabf1f98ebe50c0ee85b202fcce3b8df1f21d6ed02708bc539674c3/black-18.6b4-py36-none-any.whl
Collecting toml>=0.9.4 (from black==18.6b4)
Using cached https://files.pythonhosted.org/packages/c7/19/76c3cb84949a0593767b32b9be83a604d8a68c3580ff5d0ee64856b39ade/toml-0.9.6-py2.py3-none-any.whl
Collecting attrs>=17.4.0 (from black==18.6b4)
Using cached https://files.pythonhosted.org/packages/3a/e1/5f9023cc983f1a628a8c2fd051ad19e76ff7b142a0faf329336f9a62a514/attrs-18.2.0-py2.py3-none-any.whl
Collecting appdirs (from black==18.6b4)
Using cached https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl
Collecting click>=6.5 (from black==18.6b4)
Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Installing collected packages: toml, attrs, appdirs, click, black
Successfully installed appdirs-1.4.3 attrs-18.2.0 black-18.6b4 click-6.7 toml-0.9.6
What is the output of poetry debug:info?
dimitris@foobar ~/poetry> poetry debug:info 1 master
Poetry
======
* Version: 0.11.5
* Python: 3.6.5
Virtualenv
==========
* Python: 3.6.5
* Implementation: CPython
* Path: /home/dimitris/.cache/pypoetry/virtualenvs/poetry-py3.6
System
======
* Platform: linux
* OS: posix
This is strange. Why is Poetry using the pip from a Python 2 executable since the virtualenv is Python 3.6?
Alright, I have figured it out. Simply calling /usr/bin/pip or pip doesn't guarantee that pip3 will run and is very dependent on the distribution and Os.
To test the hypothesis, I created a symbolic link as such:
sudo ln -s /usr/bin/pip3 /usr/bin/pip
Then run poetry install and it has successfully installed all dependencies.
Perhaps a note somewhere in documentation or say calling pip3 instead of pip can prevent this from happening again.
I've also hit the same problem installing black:
$ poetry add --dev black
[ValueError]
Could not find a matching version of package black
(That's from inside a 3.6 pyenv virtualenv.)
Black doesn't have a stable release yet. You need to install it with:
poetry add --dev --allow-prereleases black
Corresponding ticket in Black https://github.com/python/black/issues/517.
Most helpful comment
Black doesn't have a stable release yet. You need to install it with: