Skip to content

Use 'python3 -m venv' instead of virtualenv#15754

Merged
jsoriano merged 4 commits intoelastic:feature/python3from
andrewkroh:feature/python3-venv
Jan 24, 2020
Merged

Use 'python3 -m venv' instead of virtualenv#15754
jsoriano merged 4 commits intoelastic:feature/python3from
andrewkroh:feature/python3-venv

Conversation

@andrewkroh
Copy link
Copy Markdown
Member

Switch over to python3 -m venv instead of virtualenv. It's the recommended way to create virtual Python environments in 3.4 and above.

https://docs.python.org/3/library/venv.html

Copy link
Copy Markdown
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also replace the virtualenv calls in the Makefile in the root directory and the one in generator/common/Makefile.

@andrewkroh
Copy link
Copy Markdown
Member Author

I'll check that out. I found a few more direct calls to python that need to be fixed too.

Switch over to `python3 -m venv` instead of `virtualenv`. It's the recommended way to create virtual Python environments in 3.4 and above.

https://docs.python.org/3/library/venv.html
Remove any direct references to python to always allow
a specific python binary or version to be used.
@andrewkroh andrewkroh force-pushed the feature/python3-venv branch from 2d113a1 to 06153c3 Compare January 23, 2020 15:14
@andrewkroh andrewkroh requested a review from a team as a code owner January 23, 2020 15:14
@andrewkroh andrewkroh requested a review from jsoriano January 23, 2020 15:18
@jsoriano jsoriano mentioned this pull request Jan 23, 2020
63 tasks
@jsoriano
Copy link
Copy Markdown
Member

It seems that we need to install python3-venv in travis or somewhere else.

@andrewkroh
Copy link
Copy Markdown
Member Author

Oh yeah..., Debian has split up the python distribution so you need that package to get the venv module.

Will add that.

@jsoriano
Copy link
Copy Markdown
Member

Merging this, thanks!

@jsoriano jsoriano merged commit 81bb7ef into elastic:feature/python3 Jan 24, 2020
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Switch over to `python3 -m venv` instead of `virtualenv`. It's the recommended way to create virtual Python environments in 3.4 and above.

https://docs.python.org/3/library/venv.html

Remove any direct references to python to always allow
a specific python binary or version to be used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants