#6444 [Other] Linux - Build failed after update - .venv move to terminal broke pip

open · @jytou · 2 评论 · 去 GitHub 看

Setup & installLinux

说明

Environment: Linux (assuming it will be the same for any linux box)
Strata version: 0.1.63

The whole "moving environment to directory terminal" created a problem: the `cmake` and `ninja` packages installed with `pip` became broken after the move - actually even pip itself is broken.

The symptom is this:
```
  The engine's source changed: compiling it again (only what changed, a few minutes) ...
  [ok] CMake and Ninja build tools already installed

  [X]  cmake / ninja not found after installing them
       run: .venv python -m pip install -r requirements-build.txt

Setup stopped. Fix the item above and run it again - everything already done is kept and skipped.
  [!]  could not compile the updated engine: starting the installed one
```

Indeed, when trying `cmake --version` (after making sure your `.venv/bin` is in the path), you get:
```
$ cmake --version
exec: Failed to execute process '/<path>/Strata/terminal/.venv/bin/cmake': The file specified the interpreter '/<path>/Strata/.venv/bin/python', which is not an executable command.
```
-> indeed pointing to the old `.venv` path.

The fix is to manually uninstall/reinstall pip and then both packages. I’ve had this happen on 2 different machines (same problem, same fix - slightly different Linux setups):
```
$ cd terminal
$ .venv/bin/python -m ensurepip --upgrade
$ .venv/bin/python -m pip install --upgrade --force-reinstall pip
$ .venv/bin/pip uninstall cmake ninja
$ .venv/bin/pip install -r requirements-build.txt
$ cd ..
$ ./setup --update
```
-> success.

本站相关内容

相关页面的快捷入口。