invoke-ai / InvokeAI

Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
23.7k stars 2.43k forks source link

[enhancement]: Installer requests python verions 3.11 or less - current version is 3.12. #5674

Open ppboyle opened 9 months ago

ppboyle commented 9 months ago

Is there an existing issue for this?

Contact Details

No response

What should this feature add?

Why not let your installer respect the latest python version levels, vs having a user have to download older versions?

Alternatives

No response

Additional Content

No response

hipsterusername commented 9 months ago

This a dependency compatibility issue. PyTorch, a main machine learning library, currently only supports 3.11.

Regnalf commented 9 months ago

I have this issue too on a mac. But in my case it crashes the update.

update_invoke_issue

Installed Version is 3.12. Would pyenv help?

UnconnectedBedna commented 9 months ago

Use pyenv to install and the version of python you need, refer to your specific operating system on how to.

Make sure pyenv is enabled system wise On arch based it can be something like (from the directory where you run the application):

pyenv install 3.11.6
pyenv local 3.11.6
pyenv shell 3.11.6
python -m venv venv
tcmbackwards commented 8 months ago

On windows you can use python launcher (py.exe) to choose the version which builds the venv during the installation. The venv will use the right version of python from then on.

Edit install.bat:

@rem -------------- Install and Configure ---------------

old:
call python .\lib\main.py 

new:
call py -3.11 .\lib\main.py 

pause
exit /b
Coder-Harshit commented 7 months ago

instead of virtualenv it would be better to revert to conda or miniconda to make it possible to have specific python install in env. i think so

UnconnectedBedna commented 7 months ago

instead of virtualenv it would be better to revert to conda or miniconda

What do you think conda does? It's just another way of creating a containerized environment. :)

Use what YOU feel comfortable with, the important part is you make it "containerized" so you can control what python version is used.

leder11011 commented 5 months ago

Use pyenv to install and the version of python you need, refer to your specific operating system on how to.

Make sure pyenv is enabled system wise On arch based it can be something like (from the directory where you run the application):

pyenv install 3.11.6
pyenv local 3.11.6
pyenv shell 3.11.6
python -m venv venv

I followed the steps on manjaro - python 3.12 before, 3.11.6 after installation. But I still get an error running the installer:

/home/leder/invokeai/.venv/bin/python: error while loading shared libraries: libpython3.11.so.1.0: cannot open shared object file: No such file or directory

eboye commented 5 months ago

Use pyenv to install and the version of python you need, refer to your specific operating system on how to. Make sure pyenv is enabled system wise On arch based it can be something like (from the directory where you run the application):

pyenv install 3.11.6
pyenv local 3.11.6
pyenv shell 3.11.6
python -m venv venv

I followed the steps on manjaro - python 3.12 before, 3.11.6 after installation. But I still get an error running the installer:

/home/leder/invokeai/.venv/bin/python: error while loading shared libraries: libpython3.11.so.1.0: cannot open shared object file: No such file or directory

same here

UnconnectedBedna commented 4 months ago

No you did not follow the instructions quoted here, because if you did, the path would not be a hidden directory (.venv) but rather a directory called venv.

You also have to make sure the venv is activated and in your $PATH on each reboot (in .bashrc or whever shell you use) or you have to activate the pyenv every time. Was that what you guys did? Rebooted without making sure you pyenv is available after?

Example:

export PYENV_ROOT="$HOME/.pyenv"
eval "$(pyenv init -)"

Edit Also, the 3.11.6 was just a random example I used. Just use 3.11 instead and it will pull the latest available for you (3.11.9 IIRC) You can remove a pyenv with pyenv uninstall x.x.x where x is the version numbers.

JamesClarke7283 commented 4 months ago

It appears pytorch now supports 3.12, so you can remove the <3.11 requirement now. https://pypi.org/project/torch/#files