当前位置:网站首页>Google collab trample pit

Google collab trample pit

2022-07-04 22:51:00 Jay_ Mapp

1. In use , First transfer data into Google Drive in , And then in Colab Middle link Google Colab

from google.colab import drive
drive.mount('/content/drive')

2. Go to your own folder :

stay colab in , Just do this directly

cd  The name of the folder you want to enter /

3. install Anaconda To configure the required installation package :

!wget -c https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh
!chmod +x Anaconda3-5.1.0-Linux-x86_64.sh
!bash ./Anaconda3-5.1.0-Linux-x86_64.sh -b -f -p /usr/local
 
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')

4.Linux Next Anaconda Virtual environment creation 、 Activate

Virtual environment creation :

!conda create -n  Virtual environment name  python=3.7

Activate the virtual environment :

!source cnonda activate  A virtual environment 

After the virtual environment is activated , There is no need to carry out other operations , After activating the virtual environment , Want to run python The file will run in this virtual environment

There are three common errors in installing various dependent libraries :

(1)Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nr4ydx_8/opencv-python/

!pip install --upgrade setuptools

(2)Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ud_idlo6/opencv-python/

!python -m pip install --upgrade pip

(3)ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

pip install PyYAML --ignore-installed

原网站

版权声明
本文为[Jay_ Mapp]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207041956429639.html