Support
Quality
Security
License
Reuse
kandi has reviewed faceswap and discovered the below as its top functions. This is intended to give you an instant insight into faceswap implemented functionality, and help decide if they suit your requirements.
Gather photos and/or videos
Extract faces from your raw photos
Train a model on the faces extracted from the photos/videos
Convert your sources with the model
install python 3.7 via google colab as default python
# install Anaconda3
!wget -qO ac.sh https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh
!bash ./ac.sh -b
# a fake google.colab library
!ln -s /usr/local/lib/python3.6/dist-packages/google \
/root/anaconda3/lib/python3.8/site-packages/google
# start jupyterlab, which now has Python3 = 3.8
!nohup /root/anaconda3/bin/jupyter-lab --ip=0.0.0.0&
# access through ngrok, click the link
!pip install pyngrok -q
from pyngrok import ngrok
print(ngrok.connect(8888))
# Install the python version
!apt-get install python3.7
# Select the version
!python3.7 setup.py
virtualenv env --python=python3.7
-----------------------
# install Anaconda3
!wget -qO ac.sh https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh
!bash ./ac.sh -b
# a fake google.colab library
!ln -s /usr/local/lib/python3.6/dist-packages/google \
/root/anaconda3/lib/python3.8/site-packages/google
# start jupyterlab, which now has Python3 = 3.8
!nohup /root/anaconda3/bin/jupyter-lab --ip=0.0.0.0&
# access through ngrok, click the link
!pip install pyngrok -q
from pyngrok import ngrok
print(ngrok.connect(8888))
# Install the python version
!apt-get install python3.7
# Select the version
!python3.7 setup.py
virtualenv env --python=python3.7
-----------------------
# install Anaconda3
!wget -qO ac.sh https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh
!bash ./ac.sh -b
# a fake google.colab library
!ln -s /usr/local/lib/python3.6/dist-packages/google \
/root/anaconda3/lib/python3.8/site-packages/google
# start jupyterlab, which now has Python3 = 3.8
!nohup /root/anaconda3/bin/jupyter-lab --ip=0.0.0.0&
# access through ngrok, click the link
!pip install pyngrok -q
from pyngrok import ngrok
print(ngrok.connect(8888))
# Install the python version
!apt-get install python3.7
# Select the version
!python3.7 setup.py
virtualenv env --python=python3.7
QUESTION
install python 3.7 via google colab as default python
Asked 2020-Nov-19 at 20:16I need to use python3.7 as default python version to use in google colab(via this notebook ) for testing the faceswap GitHub project, by this codes:
%cd "/content/faceit"
!rm -rf faceswap
!git clone https://github.com/deepfakes/faceswap.git
%cd faceswap
!python setup.py
The reason is that,when i try to install faceswap in google colab i get this error:
/content/faceit
Cloning into 'faceswap'...
remote: Enumerating objects: 7725, done.
remote: Total 7725 (delta 0), reused 0 (delta 0), pack-reused 7725
Receiving objects: 100% (7725/7725), 194.20 MiB | 31.66 MiB/s, done.
Resolving deltas: 100% (5338/5338), done.
/content/faceit/faceswap
INFO Running as Root/Admin
INFO The tool provides tips for installation
and installs required python packages
INFO Setup in Linux 4.19.112+
INFO Installed Python: 3.6.9 64bit
ERROR Please run this script with Python version 3.7 or 3.8 64bit and try again.
So based of the different python module which needs to be installed by different files, it needs to install python 3.7 and set it as python default command.
I would appropriate, any help to solve it.
Thanks.
ANSWER
Answered 2020-Nov-19 at 20:16According to this post, there are different ways to run a specific version of Python on Colab:
The code sample is below
# install Anaconda3
!wget -qO ac.sh https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh
!bash ./ac.sh -b
# a fake google.colab library
!ln -s /usr/local/lib/python3.6/dist-packages/google \
/root/anaconda3/lib/python3.8/site-packages/google
# start jupyterlab, which now has Python3 = 3.8
!nohup /root/anaconda3/bin/jupyter-lab --ip=0.0.0.0&
# access through ngrok, click the link
!pip install pyngrok -q
from pyngrok import ngrok
print(ngrok.connect(8888))
Additionally, I recommend you to use it by specifying the Python version to run a script on colab.
# Install the python version
!apt-get install python3.7
# Select the version
!python3.7 setup.py
You can see this example I have tried.
If you will use multiple library versions, you can also use virtualenv on colab by specify the python version with --python
option. Foe example:
virtualenv env --python=python3.7
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Explore Related Topics