iT邦幫忙

2019 iT 邦幫忙鐵人賽

DAY 8
0
自我挑戰組

linux+python+ffnet實現人工類神經網路系列 第 8

[Day8] 設定virtualenv

接下來我們要藉由virtualenv設定我們所需要的環境,本次使用的是python2 + ffnet 所以我們先建立一個虛擬環境

在終端機上輸入
https://ithelp.ithome.com.tw/upload/images/20181023/20112571ZkZhZdCNMs.png

virtualenv fe --python=python2.7 

筆記:
virtualenv 創立一個虛擬環境
fe 虛擬環境的名稱
--python 版本是多少
python2.7 版本是2.7版本

接下來是會用到的基本操作

  1. 打開虛擬環境,成功會看到一個小括號(fe)在前面
    https://ithelp.ithome.com.tw/upload/images/20181023/20112571GVuhWd2xkh.png
source ~/fe/bin/activate

source 虛擬環境的啟動檔案在哪?
~/fe/bin/activate
'~':家目錄
'fe':fe資料夾(目錄)
'bin':bin資料夾(目錄)
'activate':activate檔案

2.列出使用pip安裝的模組/套件
https://ithelp.ithome.com.tw/upload/images/20181023/20112571rNECCGCnIh.png

pip list

我們可以看到裡面非常的乾淨,我們可以針對每一個專案安裝相對硬的套件。

3.關閉virtualenv
https://ithelp.ithome.com.tw/upload/images/20181023/201125712TuX9QvOEZ.png

deactivate

本日結束


上一篇
[Day7] 安裝pip-->安裝virtual environment
下一篇
[Day9] 安裝ffent的前置作業
系列文
linux+python+ffnet實現人工類神經網路23
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言