You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then when trying to see if os.getrandom is working in my activated virtual env:
❯ python
Python 3.12.9 (main, Feb 5 2025, 19:10:45) [Clang 19.1.6 ] on linux
Type "help", "copyright", "credits" or "license"for more information.
>>> import os
>>> os.getrandom(256,1)
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
AttributeError: module 'os' has no attribute 'getrandom'. Did you mean: 'urandom'?
>>>
Checking HAVE_GETRANDOM as well:
❯ python
Python 3.12.9 (main, Feb 5 2025, 19:10:45) [Clang 19.1.6 ] on linux
Type "help", "copyright", "credits" or "license"for more information.
>>> import sysconfig
>>> sysconfig.get_config_vars("HAVE_GETRANDOM")
[0]
Summary
My actual system Python is 3.13.2. The Python environment I'm trying to install in my virtual environment is Python 3.12 with uv.
I've followed these steps:
This is my
pyvenv.vfg
file:❯ cat pyvenv.cfg home = /home/name/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/bin implementation = CPython uv = 0.6.2 version_info = 3.12.9 include-system-site-packages = false
Then when trying to see if
os.getrandom
is working in my activated virtual env:Checking
HAVE_GETRANDOM
as well:Is there a way to enable this option with uv?
Possible similar/related issue: #8429
Platform
6.12.10-arch1-1
Version
uv 0.6.2
Python version
Python 3.13.2
The text was updated successfully, but these errors were encountered: