Giter VIP home page Giter VIP logo

conda-command's Introduction

ติดตั้ง conda ครั้งแรกบางครั้งต้องเพิ้ม (base) เข้าไปใน command

conda init base

อัปเดต conda

conda update -n base -c defaults conda

โดยเริ่มต้นแล้ว env ที่จะเรียกใช้คือ base
แต่เราก็สามารถ เอาออกได้โดยใช้

conda deactivate

และเรียกใช้โดยใช้คำสั่ง

conda activate base

ได้เหมือน env อื่นที่สร้างขึ้น

ดูรายละเอียดของ conda ในเครื่อง

conda info

ดูรายชื่อ env ในเครื่อง

conda info --envs 

สร้าง env (ในที่นี้ตั้งชื่อว่า Boat และใช้ python เวอร์ชั่น 3.7

conda create --name Boat python==3.7
              หรือ
conda create -n Boat python=3.7

สร้าง env พร้อมติดตั้ง tensorflow

conda create -n Boat tensorflow

เรียกใช้งาน env (ในที่นี้เรียกใช้ env ที่ชื่อว่า Boat)

conda activate Boat

ยกเลิกการใช้งาน env

conda deactivate

ดู package ทั้งหมดที่ติกดตั้งใน env นั้น

conda list --explicit

ติดตั้ง package

conda install matblotlib

วิธีสั่ง env ให้มี package เหมือนกับ env ที่เคยสั้งไว้

  1. activate env ที่ต้องการให้คัดลอง package (ในที่นี้เรียกใช้ env ที่ชื่อว่า py3)
conda activate py3
  1. บันทึกรายการ package ที่ต้องการคัดลอกเก็บไว้ใน txt ไฟล์ (ในที่นี้จะเก็บไว้ในไฟล์ Pac.txt)
conda list --explicit > Pac.txt
  1. สร้าง env ใหม่โดยนำรายการที่บันทึกในไฟล์ txt มาใช้ (ในที่นี้ตั้งชื่อ env ใหม่ว่า py3_new)
conda create -n py3_new --file Pac.txt

ลบ env (ในที่นี้ลบ env ที่ชื่อว่า py3)

conda remove -n py3 --all

เพิ่ม env ernel ของ jupyter notebook

  1. อาจต้องติดตั้ง upyter notebook ก่อน (สำหรับ miniconda ต้องทำ)
conda install -y jupyter
  1. ติดตั้ง ipykernel
conda install -y ipykernel
  1. นำ env ที่เราอยู่ไปบันทึกใน kernel พร้อมตั้งชื่อที่จะแสดงบน jupyter notebook (ในที่นี้ env ชื่อว่า tf และชื่อที่แสดงใน jupyter notebook คือ tensorflow)
python -m ipykernel install --user --name tf --display-name "tensorflow"

เรียกใช้ jupyter notebook

jupyter notebook

conda-command's People

Contributors

boat-sky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.