Page 1 of 1

Why the faceswap2.0 need python 3.7,on Google colab we only have python 3.6

Posted: Mon Feb 01, 2021 1:28 am
by cuplearner

As what you see ,why the faceswap2.0 need python 3.7.Can we use python 3.6 on faceswap2.0? Then one who dose not have a high level GPU can try some other models on Google colab.


Re: Why the faceswap2.0 need python 3.7,on Google colab we only have python 3.6

Posted: Mon Feb 01, 2021 11:15 am
by torzdf

Unfortunately we use functions in Faceswap that are not available in Python 3.6.

I couldn't say what they are off the top of my head, and since we don't directly support Collab I am unlikely to spend the time going through the code and backporting these functions.

Python 3.6 is now 5 years old, so the onus should be on Google to update to a more recent release then for us to back port, however we do welcome Pull Requests to improve compatibility.


Re: Why the faceswap2.0 need python 3.7,on Google colab we only have python 3.6

Posted: Tue Feb 02, 2021 2:56 am
by cuplearner

:idea: so the problem is money.


Re: Why the faceswap2.0 need python 3.7,on Google colab we only have python 3.6

Posted: Wed Feb 17, 2021 8:17 pm
by AtlasRedux
cuplearner wrote: Tue Feb 02, 2021 2:56 am

:idea: so the problem is money.

What? No, the problem is Python 3.6 is outdated. It can't do features the software needs. 3.6 is dead. Almost no one uses that anymore. You can't magically get 3.6 to work with new APIs and features.

That's like asking for Windows 3.11 to suddenly be as good as Windows 10.
It's just not possible.
You'd have to completely rewrite it ... and that is what was done. And the rewrite is 3.7.


Re: Why the faceswap2.0 need python 3.7,on Google colab we only have python 3.6

Posted: Tue Feb 23, 2021 5:43 am
by police.bike

Update - Feb 20, 2021

I was able to get both python 3.7 & 3.8 working on google collab and train using latest versions. Pretty amazing ones !

Just use this as block 1 before running any steps within the Collab notebook

Code: Select all

!sudo apt install python3.7
!update-alternatives --install /usr/local/bin/python3 python3 /usr/bin/python3.6 1
!update-alternatives --install /usr/local/bin/python3 python3 /usr/bin/python3.7 2
!python --version
!sudo apt update && upgrade
!sudo apt install python3-pip
!python -m pip install --upgrade pip
!pip --version
!python --version
!pip --version

Change 3.7 to 3.8 if you need it. This will reset python runtime to 3.7.5 and will get latest faceswap editions working.

Have fun !!!


Re: Why the faceswap2.0 need python 3.7,on Google colab we only have python 3.6

Posted: Tue Mar 02, 2021 3:20 am
by cuplearner
AtlasRedux wrote: Wed Feb 17, 2021 8:17 pm
cuplearner wrote: Tue Feb 02, 2021 2:56 am

:idea: so the problem is money.

What? No, the problem is Python 3.6 is outdated. It can't do features the software needs. 3.6 is dead. Almost no one uses that anymore. You can't magically get 3.6 to work with new APIs and features.

That's like asking for Windows 3.11 to suddenly be as good as Windows 10.
It's just not possible.
You'd have to completely rewrite it ... and that is what was done. And the rewrite is 3.7.

Actually,I mean i have to get a more excellent GPU on my notebook in order to use faceswap2.0 rather than using Google colab.


Re: Why the faceswap2.0 need python 3.7,on Google colab we only have python 3.6

Posted: Tue Mar 02, 2021 3:23 am
by cuplearner
police.bike wrote: Tue Feb 23, 2021 5:43 am

Update - Feb 20, 2021

I was able to get both python 3.7 & 3.8 working on google collab and train using latest versions. Pretty amazing ones !

Just use this as block 1 before running any steps within the Collab notebook

Code: Select all

!sudo apt install python3.7
!update-alternatives --install /usr/local/bin/python3 python3 /usr/bin/python3.6 1
!update-alternatives --install /usr/local/bin/python3 python3 /usr/bin/python3.7 2
!python --version
!sudo apt update && upgrade
!sudo apt install python3-pip
!python -m pip install --upgrade pip
!pip --version
!python --version
!pip --version

Change 3.7 to 3.8 if you need it. This will reset python runtime to 3.7.5 and will get latest faceswap editions working.

Have fun !!!

Amazing! How did you make it? I mean your command , I know little about them.