Repository navigation
Closed
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption). -
Poetry version: 1.0.3
-
pyproject.toml file: https://github.com/cjw296/carly/blob/master/pyproject.toml
Issue
virtualenv 20 was released earlier this month, and looks like CircleCI's images were just rebuilt to use it. So, now, on Python 2, poetry install fails as follows:
circleci@32ce45b8e19b:~/project$ poetry install -v
Creating virtualenv carly-3aSsmiER-py2.7 in /home/circleci/.cache/pypoetry/virtualenvs
[ImportError]
cannot import name create_environment
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/usr/local/lib/python2.7/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/usr/local/lib/python2.7/site-packages/clikit/api/command/command.py", line 163, in _do_handle
self._dispatcher.dispatch(PRE_HANDLE, event)
File "/usr/local/lib/python2.7/site-packages/clikit/api/event/event_dispatcher.py", line 22, in dispatch
self._do_dispatch(listeners, event_name, event)
File "/usr/local/lib/python2.7/site-packages/clikit/api/event/event_dispatcher.py", line 89, in _do_dispatch
listener(event, event_name, self)
File "/usr/local/lib/python2.7/site-packages/poetry/console/config/application_config.py", line 89, in set_env
env = env_manager.create_venv(io)
File "/usr/local/lib/python2.7/site-packages/poetry/utils/env.py", line 610, in create_venv
self.build_venv(str(venv), executable=executable)
File "/usr/local/lib/python2.7/site-packages/poetry/utils/env.py", line 674, in build_venv
from virtualenv import create_environment
The most pragmatic solution, at this point, is to have poetry pin the virtualenv it uses to <20, or just vendor it, since realistically, it's only going to be used on Python 2, right?
Reacted by Mat Gadd
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Activity
finswimmer commentedon Feb 27, 2020
Hey @cjw296,
could you please test if #2096 fixes this problem?
fin swimmer
cjw296 commentedon Feb 28, 2020
Not easily, how would you recommend I do that?
sdispater commentedon Feb 28, 2020
@cjw296 I don't understand how you end up with
virtualenv >20since Poetry restricts thevirtualenvversion: https://github.com/python-poetry/poetry/blob/master/pyproject.toml#L49. So there must be something wrong with your environment.Drarok commentedon Feb 28, 2020
@sdispater I'm also a user of CircleCI and seeing the same issue. CircleCI appear to pre-install poetry on their image, but have also upgraded the system
virtualenvto 20. 😕cjw296 commentedon Feb 28, 2020
Here's the relevant bit of their Dockerfile:
https://github.com/CircleCI-Public/circleci-dockerfiles/blob/master/python/images/2.7.17/Dockerfile#L95
cjw296 commentedon Feb 28, 2020
I wonder where pip is coming from and what version it is? Maybe @FelicianoTech can help with this?
cjw296 commentedon Feb 28, 2020
Where do we find the docker file for the upstream Python image?
github-actions commentedon Mar 3, 2024
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.