Create virtualenv failed when build with automate-git.py

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Create virtualenv failed when build with automate-git.py

Postby yuki » Sat Mar 23, 2024 8:09 am

Hello everyone,

I've been working on compiling CEF using the `automate-git.py` script and encountered an issue related to the creation of the virtual environment that I'm unable to resolve. Despite upgrading Python to the latest version, the problem persists.

Here's the specific error message I encounter:

```
[E2024-03-23T18:51:04.003150+08:00 3040 0 venv.go:975] Command (cwd=C:\Users\username\AppData\Local\Temp\vpython_bootstrap733727795\packages\virtualenv-15.1.0): [F:\code\chromium_git\depot_tools\bootstrap-2@3_11_6_chromium_30_bin\python3\bin\python3.exe -B -E -s virtualenv.py --no-download C:\Users\username.vpython-root\02318f]
Process output:
C:\Users\username\AppData\Local\Temp\vpython_bootstrap733727795\packages\virtualenv-15.1.0\virtualenv.py:1039: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import imp
Using base prefix 'F:\code_904430\chromium_git\depot_tools\bootstrap-2@3_11_6_chromium_30_bin\python3\bin'
Traceback (most recent call last):
File "C:\Users\username\AppData\Local\Temp\vpython_bootstrap733727795\packages\virtualenv-15.1.0\virtualenv.py", line 2328, in <module>
main()
File "C:\Users\username\AppData\Local\Temp\vpython_bootstrap733727795\packages\virtualenv-15.1.0\virtualenv.py", line 703, in main
create_environment(home_dir,
File "C:\Users\username\AppData\Local\Temp\vpython_bootstrap733727795\packages\virtualenv-15.1.0\virtualenv.py", line 923, in create_environment
py_executable = os.path.abspath(install_python(
^^^^^^^^^^^^^^^
File "C:\Users\username\AppData\Local\Temp\vpython_bootstrap733727795\packages\virtualenv-15.1.0\virtualenv.py", line 1132, in install_python
copy_required_modules(home_dir, symlink)
File "C:\Users\username\AppData\Local\Temp\vpython_bootstrap733727795\packages\virtualenv-15.1.0\virtualenv.py", line 1062, in copy_required_modules
dst_filename = change_prefix(filename, dst_prefix)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\username\AppData\Local\Temp\vpython_bootstrap733727795\packages\virtualenv-15.1.0\virtualenv.py", line 1021, in change_prefix
filename = os.path.abspath(filename)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen ntpath>", line 573, in abspath
File "<frozen ntpath>", line 540, in normpath
TypeError: expected str, bytes or os.PathLike object, not NoneType
```

Interestingly, I don't have the `C:\Users\[username]\AppData\Local\Temp\vpython_bootstrap733727795\packages\virtualenv-15.1.0\virtualenv.py` file or even the path on my computer.

To give you an idea of my setup and the command I'm using to compile, here they are:

```
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GYP_MSVS_VERSION=2022
set CEF_ARCHIVE_FORMAT=tar.bz2
python3 automate\automate-git.py --download-dir=F:\code\chromium_git --branch=4389 --minimal-distrib --client-distrib --force-clean --x64-build
```

I've tried upgrading Python to address this issue but to no avail. It seems like the problem is not directly related to the Python version.

Has anyone encountered a similar issue or have any suggestions on how to resolve this? Any help or insight would be greatly appreciated.

Thank you in advance!
yuki
Newbie
 
Posts: 1
Joined: Sat Mar 23, 2024 7:55 am

Re: Create virtualenv failed when build with automate-git.py

Postby KatrinaS » Tue Mar 26, 2024 5:04 pm

It may depend on the OS but as far as I'm aware (and no I'm not a mastah) you may need to roll back the Python version to like 3.10.x because there is some change to API somewhere,, see if that helps anyway :)
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 186 guests

cron