Bug 168511 - There is no venv module in embedded Python distribution
Summary: There is no venv module in embedded Python distribution
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium enhancement
Assignee: Xisco Faulí
URL:
Whiteboard: target:26.2.0 target:25.8.3
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-22 21:24 UTC by denis.gz
Modified: 2025-10-20 18:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description denis.gz 2025-09-22 21:24:20 UTC
Description:
--

Steps to Reproduce:
1. Open console window
2. Create a working folder for a new project, change to that folder:
   mkdir proj && cd proj
3. Add (prepend) "C:\Program Files\LibreOffice\program" to the PATH:
   set PATH=C:\Program Files\LibreOffice\program;%PATH%
4. Verify the python.exe to be executed is the one from LibreOffice:
   where python
5. Run command:
   python -m venv venv

Actual Results:
Error occurs:
C:\Program Files\LibreOffice\program\python-core-3.10.18\bin\python.exe: No module named venv

Expected Results:
The virtual environment named "venv" is created in the folder created on step 2


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Creating a virtual environment for any project is the standard approach in Python development. This helps a developer to ensure the development environment is the same as the runtime environment, and also makes packaging with ooscript easier. Lacking support for venv complicates development tasks, especially on Windows.
Comment 1 Xisco Faulí 2025-09-23 08:22:17 UTC
Fix in https://gerrit.libreoffice.org/c/core/+/191377
Comment 2 Commit Notification 2025-09-23 09:22:14 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/dd8c42bf4b6eb5f692bb929547f69a9aedcf6c0c

tdf#168511: python3: bundle venv

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2025-09-23 12:18:42 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/dcd517331c8db63fee75b1519608e9ca94a491bb

related tdf#168511: bundle venv on mac too + Add test

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2025-10-20 18:10:48 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/ecda1df6a14e99d5713309b786ff9137dda4767e

tdf#168511: python3: bundle venv

It will be available in 25.8.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2025-10-20 18:10:50 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/fbb1d7bcba219685d789c2f4cdf348f8f7f8d696

related tdf#168511: bundle venv on mac too + Add test

It will be available in 25.8.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.