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

venv/bin/activate: No such file or directory #104

Closed
nirushka opened this issue Aug 1, 2024 · 6 comments
Closed

venv/bin/activate: No such file or directory #104

nirushka opened this issue Aug 1, 2024 · 6 comments

Comments

@nirushka
Copy link

nirushka commented Aug 1, 2024

Hi,

Trying to run edk2-nvidia/Platform/NVIDIA/Jetson/build.sh after all installations and receive the following error:

nvidia: building from workspace rooted at: /home/niro/tmp/UEFI/nvidia-uefi
nvidia: found command: python3.
nvidia: found command: virtualenv.
nvidia: found command: mono.
nvidia: found command: aarch64-linux-gnu-gcc.
nvidia: found Python 3.10 or later.
nvidia: Creating Python virtual environment in /home/niro/tmp/UEFI/nvidia-uefi/venv...
created virtual environment CPython3.10.12.final.0-64 in 72ms
creator CPython3Posix(dest=/home/niro/tmp/UEFI/nvidia-uefi/venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/niro/.local/share/virtualenv)
added seed packages: pip==22.0.2, setuptools==59.6.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
/home/niro/tmp/UEFI/nvidia-uefi/edk2-nvidia/Platform/NVIDIA/Jetson/../../../Silicon/NVIDIA/scripts/prepare_stuart.sh: line 29: venv/bin/activate: No such file or directory

thoughts?

@jgarver
Copy link
Contributor

jgarver commented Aug 1, 2024

It appears your virtualenv didn't actually create a venv. The output looks very similar to what I see when I run it though.

What is in /home/niro/tmp/UEFI/nvidia-uefi/venv?

@nirushka
Copy link
Author

nirushka commented Aug 1, 2024

niro@niros-PC:~/tmp/UEFI/nvidia-uefi/venv$ ls
lib local pyvenv.cfg

@jgarver
Copy link
Contributor

jgarver commented Aug 1, 2024

The bin directory is missing, but you have a local directory instead. I'm not familiar with this layout.

Can you explore local? Does it have an activate?

@nirushka
Copy link
Author

nirushka commented Aug 1, 2024

The local directory had bin directory inside, changed the build script and now its working, thx.

@jgarver
Copy link
Contributor

jgarver commented Aug 1, 2024

It sounds like this issue:
https://askubuntu.com/questions/1406304/virtualenv-installs-envs-into-local-bin-instead-of-bin

If so, a quick fix is to modify edk2-nvidia/Silicon/NVIDIA/scripts/prepare_stuart.sh to use venv/local/bin/activate instead of venv/bin/activate. You'll need to do this in two places.

@jgarver
Copy link
Contributor

jgarver commented Aug 1, 2024

OK, I'll look for a more permanent fix and get it into our next release. Thanks!

@jgarver jgarver closed this as completed Aug 1, 2024
jgarver added a commit that referenced this issue Sep 6, 2024
This works-around this virtualenv bug:
pypa/virtualenv#2340

This issue came to our attention via:
#104

Signed-off-by: Jake Garver <[email protected]>
Reviewed-by: Jeff Brasen <[email protected]>
Reviewed-by: Ashish Singhal <[email protected]>
Reviewed-by: Jeshua Smith <[email protected]>
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

No branches or pull requests

2 participants