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

[bug]: Failed to bytecode-compile Python file #7686

Open
1 task done
TomerGamerTV opened this issue Feb 26, 2025 · 9 comments
Open
1 task done

[bug]: Failed to bytecode-compile Python file #7686

TomerGamerTV opened this issue Feb 26, 2025 · 9 comments
Labels
bug Something isn't working

Comments

@TomerGamerTV
Copy link

Is there an existing issue for this problem?

  • I have searched the existing issues

Operating system

Windows

GPU vendor

Nvidia (CUDA)

GPU model

RTX 4080

GPU VRAM

16GB

Version number

5.6.2

Browser

Doesn't matter rn

Python dependencies

No response

What happened

Im tried to install invokeAI for the first time and i tried both the stable and prerelease versions and both of them give me the same error

What you expected to happen

I expected it to install normally

How to reproduce the problem

Just install it on a non system drive and it supposed to happen? idk

Additional context

warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance. If the cache and target directories are on different filesystems, hardlinking may not be supported. If this is intentional, setexport UV_LINK_MODE=copyor use--link-mode=copyto suppress this warning. Installed 167 packages in 3m 25s error: Failed to bytecode-compile Python file in: .venv\Lib\site-packages Caused by: Failed to start Python interpreter to run compile script Caused by: Access is denied. (os error 5) Failed to install invokeai python package: Process exited with code 2

Discord username

No response

@TomerGamerTV TomerGamerTV added the bug Something isn't working label Feb 26, 2025
@psychedelicious
Copy link
Collaborator

It looks like the root problem is a permissions issue at the install folder:

Caused by: Access is denied.

May need to adjust the permissions on the install folder. Don't run the launcher as admin though, that will only make it worse.

@TomerGamerTV
Copy link
Author

It looks like the root problem is a permissions issue at the install folder:

Caused by: Access is denied.

May need to adjust the permissions on the install folder. Don't run the launcher as admin though, that will only make it worse.

How can I fix the perms? I'm on windows

@psychedelicious
Copy link
Collaborator

I believe you would right-click the install directory -> properties -> security and ensure your normal user account has full access. But, it's strange that you wouldn't have access by default, unless you are attempting to install to a protected folder (e.g. Program Files).

What's the install path?

@TomerGamerTV
Copy link
Author

I believe you would right-click the install directory -> properties -> security and ensure your normal user account has full access. But, it's strange that you wouldn't have access by default, unless you are attempting to install to a protected folder (e.g. Program Files).

What's the install path?

It's a folder I made on my second drive where I store all my AI things, I selected Invoke to install in its own separate folder there so I don't understand why it's happening... I will check later if something messed up the perms

@TomerGamerTV
Copy link
Author

Tried again it didn't work

@psychedelicious
Copy link
Collaborator

As a test, can you please try making a new folder at the root of the second drive and installing there?

@SteemSucker
Copy link

I had the same error message during install. I am the administrator account on this computer. What exactly does this mean?

My install path was:
E:\AI Stuff\Invoke AI

I tried copying the Invoke AI folder to the root: E:\Invoke AI and using the installation tool to run a repair install at that location. Same result.

@TomerGamerTV
Copy link
Author

As a test, can you please try making a new folder at the root of the second drive and installing there?

I tried and got this


Starting up...
Installation parameters:
- Install location: D:\InvokeAI
- GPU type: nvidia>=30xx
- Torch Platform: cuda
Creating virtual environment...
> C:\Users\USER\AppData\Local\Temp\2tHK8V6PQNi8BAls37RH9oI97Ms\resources\bin\uv.exe venv --relocatable --prompt invoke --python 3.11 --python-preference only-managed D:\InvokeAI\.venv
Using CPython 3.11.11
Creating virtual environment at: D:\InvokeAI\.venv
Activate with: D:\InvokeAI\.venv\Scripts\activate
Installing invokeai package...
> C:\Users\USER\AppData\Local\Temp\2tHK8V6PQNi8BAls37RH9oI97Ms\resources\bin\uv.exe pip install --python 3.11 --python-preference only-managed invokeai==v5.7.0 --force-reinstall --compile-bytecode --index=https://download.pytorch.org/whl/cu124
Resolved 167 packages in 2.93s
Prepared 167 packages in 724ms
warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 167 packages in 2m 49s
Bytecode compiled 19170 files in 4m 56s
 + absl-py==2.1.0
 + accelerate==1.0.1
 + aiohappyeyeballs==2.4.6
 + aiohttp==3.11.13
 + aiosignal==1.3.2
 + albucore==0.0.20
 + albumentations==1.4.21
 + annotated-types==0.7.0
 + antlr4-python3-runtime==4.9.3
 + anyio==4.8.0
 + attrs==25.1.0
 + bidict==0.23.1
 + bitsandbytes==0.45.0
 + blake3==1.0.4
 + certifi==2022.12.7
 + cffi==1.17.1
 + charset-normalizer==2.1.1
 + click==8.1.8
 + clip-anytorch==2.6.0
 + colorama==0.4.6
 + coloredlogs==15.0.1
 + compel==2.0.2
 + contourpy==1.3.1
 + controlnet-aux==0.0.7
 + cycler==0.12.1
 + datasets==2.19.1
 + deprecated==1.2.18
 + diffusers==0.31.0
 + dill==0.3.8
 + dnspython==2.7.0
 + dynamicprompts==0.31.0
 + einops==0.8.1
 + email-validator==2.2.0
 + eval-type-backport==0.2.2
 + facexlib==0.3.0
 + fastapi==0.111.0
 + fastapi-cli==0.0.7
 + fastapi-events==0.11.1
 + filelock==3.13.1
 + filterpy==1.4.5
 + flatbuffers==25.2.10
 + fonttools==4.56.0
 + frozenlist==1.5.0
 + fsspec==2024.2.0
 + ftfy==6.3.1
 + future==1.0.0
 + gguf==0.10.0
 + grpcio==1.70.0
 + h11==0.14.0
 + httpcore==1.0.7
 + httptools==0.6.4
 + httpx==0.28.1
 + huggingface-hub==0.26.1
 + humanfriendly==10.0
 + idna==3.4
 + imageio==2.37.0
 + importlib-metadata==8.6.1
 + invisible-watermark==0.2.0
 + invokeai==5.7.0
 + jax==0.5.1
 + jaxlib==0.5.1
 + jinja2==3.1.4
 + kiwisolver==1.4.8
 + lazy-loader==0.4
 + lightning-utilities==0.11.8
 + llvmlite==0.44.0
 + markdown==3.7
 + markdown-it-py==3.0.0
 + markupsafe==2.1.5
 + matplotlib==3.10.1
 + mdurl==0.1.2
 + mediapipe==0.10.14
 + ml-dtypes==0.5.1
 + mpmath==1.3.0
 + multidict==6.1.0
 + multiprocess==0.70.16
 + networkx==3.3
 + npyscreen==4.10.5
 + numba==0.61.0
 + numpy==1.26.3
 + omegaconf==2.3.0
 + onnx==1.16.1
 + onnxruntime==1.19.2
 + opencv-contrib-python==4.11.0.86
 + opencv-python==4.9.0.80
 + opencv-python-headless==4.11.0.86
 + opt-einsum==3.4.0
 + orjson==3.10.15
 + packaging==24.1
 + pandas==2.2.3
 + picklescan==0.0.21
 + pillow==11.0.0
 + prompt-toolkit==3.0.50
 + propcache==0.3.0
 + protobuf==4.25.6
 + psutil==7.0.0
 + pyarrow==19.0.1
 + pyarrow-hotfix==0.6
 + pycparser==2.22
 + pydantic==2.7.2
 + pydantic-core==2.18.3
 + pydantic-settings==2.2.1
 + pygments==2.19.1
 + pympler==1.1
 + pyparsing==3.2.1
 + pypatchmatch==1.0.1
 + pyperclip==1.9.0
 + pyreadline3==3.5.4
 + python-dateutil==2.9.0.post0
 + python-dotenv==1.0.1
 + python-engineio==4.11.2
 + python-multipart==0.0.20
 + python-socketio==5.11.1
 + pytorch-lightning==2.1.3
 + pytz==2025.1
 + pywavelets==1.8.0
 + pywin32==308
 + pyyaml==6.0.2
 + regex==2024.11.6
 + requests==2.28.1
 + rich==13.9.4
 + rich-toolkit==0.13.2
 + safetensors==0.4.3
 + scikit-image==0.25.2
 + scipy==1.15.2
 + semver==3.0.4
 + sentencepiece==0.2.0
 + setuptools==70.2.0
 + shellingham==1.5.4
 + simple-websocket==1.1.0
 + simsimd==6.2.1
 + six==1.17.0
 + sniffio==1.3.1
 + sounddevice==0.5.1
 + spandrel==0.3.4
 + starlette==0.37.2
 + stringzilla==3.12.1
 + sympy==1.13.1
 + tensorboard==2.19.0
 + tensorboard-data-server==0.7.2
 + test-tube==0.7.5
 + tifffile==2025.2.18
 + timm==0.6.13
 + tokenizers==0.20.3
 + torch==2.4.1+cu124
 + torchmetrics==1.0.3
 + torchsde==0.2.6
 + torchvision==0.19.1+cu124
 + tqdm==4.66.5
 + trampoline==0.1.2
 + transformers==4.46.3
 + typer==0.15.2
 + typing-extensions==4.12.2
 + tzdata==2025.1
 + ujson==5.10.0
 + urllib3==1.26.13
 + uvicorn==0.28.0
 + watchfiles==1.0.4
 + wcwidth==0.2.13
 + websockets==15.0
 + werkzeug==3.1.3
 + windows-curses==2.4.1
 + wrapt==1.17.2
 + wsproto==1.2.0
 + xxhash==3.5.0
 + yarl==1.18.3
 + zipp==3.21.0
Installation completed successfully!

We'll activate the virtual environment for the install at D:\AIGenerators\InvokeAI.

Wait I just noticed why is it activating vent at a different location than the install

@TomerGamerTV
Copy link
Author

Tried deleting venv and trying again it did not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants