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

Update install_windows.bat #653

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

justyntemme
Copy link

Ensure pip3 is used to avoid python3/python2 collisions

Found by running on windows with both pip and pip3 installed, with pip pointing to a python2 install env. This will ensure the correct version of pip is used on the system. Windows often will have multiple pip locations as depending on how you download python.

Ensure pip3 is used to avoid python3/python2 collisions
@JohanAR
Copy link
Collaborator

JohanAR commented Aug 23, 2023

Doesn't conda take care of that? I can't verify since I use neither Windows or conda, but I think that venv or virtualenv ensures that the correction pip instance is run.

@justyntemme
Copy link
Author

Okay a few things to note

When pip is called, it defaults to the user installed pip, as there is no pip install in the conda. I'm testing simply adding conda install pip to see if it then defaults to the 3.7 install, as i am having breaking issues with the user innstalled version of 3.10 not having certain opencv packages supported.

I think a better route than using pip is to convert the requirements.txt into a conda understood requirements.yaml.

Once i have this working i will post a reply ready for review :)

use conda run to specify pip installed in conda environment
add pip as package in conda env, then use conda run to execute said pip version that uses the 2020-resolver as not to break with latest versions that don't have 2020-resolver
use full version name
use -y as this is a script
@JohanAR
Copy link
Collaborator

JohanAR commented Aug 24, 2023

Someone on the internet claimed that conda install --file requirements.txt should work, perhaps you could give that a try too if you want to.

Unfortunately neither me or Alievk has the time to actively work on avatarify, so the project is in a state of disrepair currently. If you're interested in fixing stuff, there' also another issues with the install scripts:

The "--use-feature=2020-resolver" argument appears to be causing problems for some.. I didn't look much into it, but if I understood it correctly, this was something that needed to be added for a certain version of pip but then they deprecated the option fairly quickly. If it's possible to only use conda to install packages I assume this issue would go away, otherwise I'm thinking it might be an option to specify a minimum version for pip and remove the option.

And for the final PR, make sure to update install.sh (Linux) to keep them in sync. install_mac.sh is slightly different since you can't run it locally, but if it turns out to be possible to use replace pip with conda install I suppose it's best to do so everywhere.

@justyntemme
Copy link
Author

Okay so yes you were correct i did some research on the use feature 2020 resolver, seems its not needed.

As far as the conda install, i tried that and it didn't work, however using conda run to ensure it uses the pip installed in the conda environment solves that problem. will apply these changes to mac/linux and test on those platforms before letting you know its ready, however windows is fixed :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants