Open abrichr opened 5 months ago
Reproduced on fresh Windows 11 machine:
Workaround should be automated or at least documented in README.md.
poetry run postinstall
fails:
C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\openadapt-0Ma3Pw0X-py3.10\lib\site-packages\torch\utils\cpp_extension.py:359: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
building 'detectron2._C' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for detectron2
Running setup.py clean for detectron2
Building wheel for fvcore (setup.py) ... done
Created wheel for fvcore: filename=fvcore-0.1.5.post20221221-py3-none-any.whl size=61413 sha256=c37ac74942def579f478b94b735ccbd821e4ca7359e01401163e1e5b9da0cc2c
Stored in directory: c:\users\user\appdata\local\pip\cache\wheels\01\c0\af\77c1cf53a1be9e42a52b48e5af2169d40ec2e89f7362489dd0
Building wheel for antlr4-python3-runtime (setup.py) ... done
Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.3-py3-none-any.whl size=144578 sha256=92e9b701d6e390e9abafc3f0f768e7550beb4d8858aed050380955fe18c7e850
Stored in directory: c:\users\user\appdata\local\pip\cache\wheels\12\93\dd\1f6a127edc45659556564c5730f6d4e300888f4bca2d4c5a88
Successfully built fvcore antlr4-python3-runtime
Failed to build detectron2
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (detectron2)
Error installing Detectron2: Command '['C:\\Users\\user\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\openadapt-0Ma3Pw0X-py3.10\\Scripts\\python.exe', '-m', 'pip', 'install', 'git+https://github.com/facebookresearch/detectron2.git', '--no-build-isolation']' returned non-zero exit status 1.
Downloading and installing via the link worked.
PS C:\openadapt\openadapt> alembic upgrade head
alembic : The term 'alembic' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ alembic upgrade head
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (alembic:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
@Animesh404 @KIRA009 have you seen this before?
Edit: I got it working by creating a new powershell window (not elevated to admin) and running the following before poetry shell
:
Set-ExecutionPolicy RemoteSigned -Scope Process -Force
This should be documented.
This worked for me, on windows 11
: First, Open PowerShell with Run as Administrator. Then, run this command in PowerShell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned After that type Y and press Enter.
Describe the bug
When running manual install steps on Windows 11 emulated in UTM on a MacOS host, at
poetry shell
:To fix, run in every new powershell terminal:
Or, with admin privileges, run this once:
This should be documented.
To Reproduce
Run manual installation steps on Windows 11 inside UTM.