Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] cpython/3.9.7: venvlauncher is not built #9333

Open
ZbigniewRA opened this issue Feb 10, 2022 · 5 comments
Open

[package] cpython/3.9.7: venvlauncher is not built #9333

ZbigniewRA opened this issue Feb 10, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@ZbigniewRA
Copy link
Contributor

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: cpython/3.9.7
  • Operating System+version: Windows 10
  • Compiler+version: Visual Studio 2019
  • Docker image: ???
  • Conan version: conan 1.45.0
  • Python version: Python 3.9.6

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=16
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

Python interpreter for Windows is built correctly, and it includes the venv package.
Unfortuantely python -m venv doesn't work on Windows without the venvlauncher.exe/venvwlauncher.exe, which should be built as well, and included in the bin directory (alongside python.exe and pythonw.exe).

Logs (Include/Attach if Applicable)

Click to expand log
Output from "python -m venv MyVenv":

Unable to copy 'C:\\Users\\Zbigniew\\.conan\\data\\cpython\\3.9.7\\_\\_\\package\\d140711d95cc16a85766a8fc3a551dfafe84cf63\\bin\\venvlauncher.exe'
Unable to copy 'C:\\Users\\Zbigniew\\.conan\\data\\cpython\\3.9.7\\_\\_\\package\\d140711d95cc16a85766a8fc3a551dfafe84cf63\\bin\\venvwlauncher.exe'
error : [WinError 2] The system cannot find the file specified
@ZbigniewRA ZbigniewRA added the bug Something isn't working label Feb 10, 2022
@ZbigniewRA
Copy link
Contributor Author

ZbigniewRA commented Feb 10, 2022

The problem above is happening when I use default settings for cpython, like this:

[requires]
cpython/3.9.7

[generators]
cmake_multi

However if I add the following option everything works as expected:

[options]
cpython:shared=True

venvlauncher.exe is present (as \bin\Lib\venv\scripts\nt\python.exe), ensurepip works, and venv works.

If default setting shared=False is unsupported on Windows, maybe it can be added to the validation step?

@tk-tnz
Copy link
Contributor

tk-tnz commented Feb 10, 2022

Hi,

I have the same issue, but usingcpython:shared=True does not fix it. It's downloading package 6b6a5b8333d2f388bcda263a58a797b73d8e6016 from conan-center plus its dependencies, and venvlauncher.exe is not present.

@ZbigniewRA are you using other options?

My settings:

[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=Visual Studio
compiler.cppstd=None
compiler.runtime=MD
compiler.version=16
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
CC=cl.exe
CXX=cl.exe

@ZbigniewRA
Copy link
Contributor Author

Conan is downloading in my case:

  • for Release: cpython/3.9.7:6b6a5b8333d2f388bcda263a58a797b73d8e6016
  • for Debug: cpython/3.9.7:3026f51f36d0fcdff1e3d757f74d6bcf34bb2873

The venvlaunchers are under 6b6a5b8333d2f388bcda263a58a797b73d8e6016\bin\Lib\venv\scripts\nt directory, and they are called python.exe and pythonw.exe (which is correct).
Also note that \bin\Lib\ensurepip\_bundled directory contains setuptools and pip wheels, which are also needed for python -m venv XXX to work.

This is my full conanfile.txt:

Click to expand
[requires]
boost/1.78.0
poco/1.11.1
ms-gsl/3.1.0
cpython/3.9.7 # Use 3.7.12 if you want to debug using Visual Studio 2019.
pybind11/2.9.1
gtest/1.11.0
nlohmann_json/3.10.4
benchmark/1.6.0
nvtx/3.0.1
termcolor/2.0.0
date/3.0.1
tclap/1.2.4
fast-cpp-csv-parser/cci.20200830

[options]
cpython:shared=True # Doesn't build properly on Windows without it. See: https://github.com/conan-io/conan-center-index/issues/9333

[generators]
cmake_multi

My Conan profile is in the report at the top.

@tk-tnz
Copy link
Contributor

tk-tnz commented Feb 10, 2022

Thanks @ZbigniewRA, it's working now indeed - not sure why I had the same error before, despite cleaning up the package and re-installing. And thanks for finding out about the shared=True, at least I can keep moving forward.

@Ahajha
Copy link
Contributor

Ahajha commented Feb 4, 2024

I think this is due to the static cpython not supporting modules, and static is the default. I think we could/should change the default, at least on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants