[ 
https://issues.apache.org/jira/browse/BEAM-10316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17144794#comment-17144794
 ] 

Kamil Wasilewski commented on BEAM-10316:
-----------------------------------------

While it's definitely undesirable, I think this is an expected behaviour (and 
not only limited to Python containers).

For example, take a look at 
https://ci-beam.apache.org/job/beam_PostCommit_Python37/2514/consoleFull#gradle-task-79.
 Gradle creates Python 2.7 environment even though it's unnecessary, because 
this particular job uses Python 3.7. Here's a relevant log:


{code}
08:07:14 > Task :sdks:python:setupVirtualenv
08:07:14 New python executable in 
/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python37/src/build/gradleenv/1922375555/bin/python2.7
08:07:14 Also creating executable in 
/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python37/src/build/gradleenv/1922375555/bin/python
08:07:14 Installing setuptools, pip, wheel...
08:07:16 
08:07:16 > Task :model:pipeline:jar
08:07:16 
08:07:16 > Task :sdks:python:test-suites:dataflow:py37:setupVirtualenv
08:07:16 Using base prefix '/usr'
08:07:16 New python executable in 
/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python37/src/build/gradleenv/-1734967052/bin/python3.7
08:07:16 Also creating executable in 
/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python37/src/build/gradleenv/-1734967052/bin/python
08:07:16 Installing setuptools, pip, wheel...
{code}

As you can see, actually _two_ virtual environments are being created. From 
what I know, this defect affects all gradle tasks.


> Python container builds always create Python 2.7 environment
> ------------------------------------------------------------
>
>                 Key: BEAM-10316
>                 URL: https://issues.apache.org/jira/browse/BEAM-10316
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-harness
>            Reporter: Kyle Weaver
>            Assignee: Kamil Wasilewski
>            Priority: P1
>
> When I runĀ ./gradlew sdks:python:container:py37:docker, instead of the 
> command creating a Python 3.7 environment as expected, Python 2.7 (the 
> default) is used.
> > Task :sdks:python:setupVirtualenv FAILED
> created virtual environment CPython2.7.18.candidate.1-64 in 418ms



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to