再探 NLP 筆記
之前,忘了多久之前,曾經小小用過分詞工具,可以很快分詞幾百個字幾秒鐘就分好了,但是分詞結果很不理想,最近又想動手做個專案,可能會用到分詞,又去爬了爬文,還是無法繞過分詞,而分詞這工作,因為 AI 又有了一定程度的發展,除了傳統分詞方式,現在好像還可以借助 AI 之力(毒藥還是很可口的,所以敗亡之路,早已經舖好),要用 AI 了!?然後…連取得都有困難…, AI 果然讓人 I I 叫啊…
工作環境:
Windows 10 home
anaconda
base: python 3.8
paddle
jieba
一開始的時侯, anaconda 一直說找不到 paddle 的套件,後來在一個網站上看到用這個終於順利裝上了(paddlenlp),結果測試的時侯,還是出現了沒有找到 Paddle 的訊息,因為要從對岸的清大來源裝的時侯出現了錯誤訊息,只好再重新找如何安裝的 channel ,終於不用降版(很多文章都說要降版)就能裝了:
以為裝上了,結果測試的時侯,還是出現了沒有找到 Paddle 的訊息,因為要從對岸的清大來源裝的時侯出現了錯誤訊息,只好再重新找如何安裝的 channel ,好像很容易就可以裝好:
- paddlepaddle
搜索 anaconda :會出現很多來源,選一下
warnings.warn(
Packages:
Name | Version | Package Types | Platforms | Builds
------------------------- | ------ | --------------- | --------------- | ----------
Esri/paddlepaddle-gpu | 2.1.0 | conda | linux-64, win-64 | py38_gpu_cuda11.2_many_linux, py39_gpu_cuda11.2_many_linux, py39_gpu_cuda11.2_windows, py38_gpu_cuda11.2_windows, py36_gpu_cuda11.2_many_linux, py37_gpu_cuda11.2_many_linux, py36_gpu_cuda11.2_windows, py37_gpu_cuda11.2_windows
: an easy-to-use, efficient, flexible and scalable deep learning platform
Paddle/paddlepaddle | 2.1.2 | conda | linux-64, win-64, osx-64 | py35_mac, py36_cpu_windows, py39_mac, py27_cpu_windows, py39_cpu_many_linux, py35_cpu_many_linux, py36_cpu_many_linux, py36_mac, py39_cpu_windows, py27_cpu_many_linux, py35_cpu_windows, py37_cpu_many_linux, py38_cpu_many_linux, py38_mac, py27_mac, py37_mac, py37_cpu_windows, py38_cpu_windows
: an easy-to-use, efficient, flexible and scalable deep learning platform
Paddle/paddlepaddle-gpu | 2.1.2 | conda | linux-64, win-64 | py37_gpu_cuda10.0_windows, py39_gpu_cuda11.2_many_linux, py37_gpu_cuda10.0_many_linux, py35_gpu_cuda10.0_windows, py35_gpu_cuda11.0_windows, py36_gpu_cuda11.0_many_linux, py39_gpu_cuda10.2_many_linux, py35_gpu_cuda9.0_windows, py36_gpu_cuda11.0_windows, py38_gpu_cuda9.0_many_linux, py39_gpu_cuda11.2_windows, py35_gpu_cuda10.2_windows, py37_gpu_cuda9.0_many_linux, py38_gpu_cuda10.0_many_linux, py35_gpu_cuda10.1_many_linux, py27_gpu_cuda9.0_many_linux, py37_gpu_cuda10.1_many_linux, py35_gpu_cuda10.2_many_linux, py36_gpu_cuda10.2_windows, py36_gpu_cuda9.0_windows, py37_gpu_cuda10.2_windows, py38_gpu_cuda11.0_windows, py37_gpu_cuda11.2_windows, py27_gpu_cuda10.0_many_linux, py27_gpu_cuda10.0_windows, py36_gpu_cuda11.2_windows, py39_gpu_cuda10.1_windows, py36_gpu_cuda10.1_many_linux, py27_gpu_cuda10.1_many_linux, py36_gpu_cuda11.2_many_linux, py39_gpu_cuda10.1_many_linux, py27_gpu_cuda10.1_windows, py37_gpu_cuda10.2_many_linux, py38_gpu_cuda10.1_many_linux, py37_gpu_cuda11.2_many_linux, py38_gpu_cuda11.2_windows, py27_gpu_cuda10.2_many_linux, py38_gpu_cuda10.2_windows, py38_gpu_cuda9.0_windows, py36_gpu_cuda10.1_windows, py37_gpu_cuda11.0_many_linux, py27_gpu_cuda9.0_windows, py35_gpu_cuda9.0_many_linux, py38_gpu_cuda11.2_many_linux, py35_gpu_cuda10.1_windows, py38_gpu_cuda10.0_windows, py38_gpu_cuda11.0_many_linux, py35_gpu_cuda11.0_many_linux, py36_gpu_cuda10.2_many_linux, py39_gpu_cuda10.2_windows, py38_gpu_cuda10.2_many_linux, py36_gpu_cuda9.0_many_linux, py37_gpu_cuda11.0_windows, py38_gpu_cuda10.1_windows, py37_gpu_cuda10.1_windows, py36_gpu_cuda10.0_windows, py36_gpu_cuda10.0_many_linux, py35_gpu_cuda10.0_many_linux, py37_gpu_cuda9.0_windows
: an easy-to-use, efficient, flexible and scalable deep learning platform
baomengxue/paddlepaddle | 1.5.2 | conda | osx-64 | py37_mac
: an easy-to-use, efficient, flexible and scalable deep learning platform
baomengxue/paddlepaddle-gpu | | conda | [] |
: an easy-to-use, efficient, flexible and scalable deep learning platform
sangjinchao/paddlepaddle | 1.8.1 | conda | linux-64, osx-64, win-64 | py27_cpu_windows, py36_cpu_windows, py35_mac, py36_cpu_many_linux, py36_mac, py27_mac, py27_cpu_many_linux, py35_cpu_many_linux, py37_cpu_many_linux, py35_cpu_windows, py37_mac, py37_cpu_windows
: an easy-to-use, efficient, flexible and scalable deep learning platform
sangjinchao/paddlepaddle-gpu | 1.8.1 | conda | linux-64, win-64 | py27_gpu_cuda9.0_windows, py37_gpu_cuda10.0_windows, py36_gpu_cuda10.0_windows, py37_gpu_cuda10.0_many_linux, py36_gpu_cuda9.0_windows, py37_gpu_cuda9.0_many_linux, py35_gpu_cuda10.0_windows, py27_gpu_cuda9.0_many_linux, py27_gpu_cuda10.0_many_linux, py36_gpu_cuda9.0_many_linux, py27_gpu_cuda10.0_windows, py35_gpu_cuda9.0_windows, py35_gpu_cuda9.0_many_linux, py36_gpu_cuda10.0_many_linux, py35_gpu_cuda10.0_many_linux, py37_gpu_cuda9.0_windows
: an easy-to-use, efficient, flexible and scalable deep learning platform
xieyunshen/paddlepaddle | 2.0.0rc0 | conda | osx-64 | py38_mac, py35_mac, py37_mac, py27_mac, py36_mac
: an easy-to-use, efficient, flexible and scalable deep learning platform
xieyunshen_private/paddlepaddle-gpu | 2.0.0rc1 | conda | linux-64, win-64 | py27_gpu_cuda9.0_many_linux, py35_gpu_cuda10.2_windows, py27_gpu_cuda10.0_many_linux
: an easy-to-use, efficient, flexible and scalable deep learning platform
xieyunshen_private_1/paddlepaddle-gpu | 1.8.3 | conda | linux-64 | py37_gpu_cuda10.0_many_linux, py36_gpu_cuda10.0_many_linux, py35_gpu_cuda10.0_many_linux, py27_gpu_cuda10.0_many_linux
: an easy-to-use, efficient, flexible and scalable deep learning platform
Found 10 packages
Run 'anaconda show <USER/PACKAGE>' to get installation details
看 anaconda 給的提示,選一個來裝:
看 anaconda 給的回應,照燒,不!是照打:
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\ProgramData\Anaconda3
added / updated specs:
- paddlepaddle
The following packages will be downloaded:
package | build
---------------------------|-----------------
astor-0.8.1 | py38haa95532_0 47 KB
gast-0.3.3 | py_0 14 KB
libprotobuf-3.17.2 | h23ce68f_1 1.9 MB
paddlepaddle-2.1.2 | py38_cpu_windows 48.2 MB Paddle
protobuf-3.17.2 | py38hd77b12b_0 257 KB
------------------------------------------------------------
Total: 50.4 MB
The following NEW packages will be INSTALLED:
astor pkgs/main/win-64::astor-0.8.1-py38haa95532_0
gast pkgs/main/noarch::gast-0.3.3-py_0
libprotobuf pkgs/main/win-64::libprotobuf-3.17.2-h23ce68f_1
paddlepaddle Paddle/win-64::paddlepaddle-2.1.2-py38_cpu_windows
protobuf pkgs/main/win-64::protobuf-3.17.2-py38hd77b12b_0
Proceed ([y]/n)?
Downloading and Extracting Packages
astor-0.8.1 | 47 KB | ############################################################################ | 100%
protobuf-3.17.2 | 257 KB | ############################################################################ | 100%
paddlepaddle-2.1.2 | 48.2 MB | ############################################################################ | 100%
gast-0.3.3 | 14 KB | ############################################################################ | 100%
libprotobuf-3.17.2 | 1.9 MB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: failed
EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
environment location: C:\Somewhere\Anaconda#
接著來測試一下:
又來,找不到 six ,不會吧,有套件叫這名字的,結果還真的是,裝一裝就好了
結果還是找不到 paddle 回去安裝的訊息看了一下,沒有裝成功,應該是權限問題,用管理員身份到 cmd ,再次執行 anaconda(env: base) :
接著來測試一下,報錯又有東東沒 import 到,將它們 import 進來:
沒有錯誤訊息:初步算是裝好了。
牛刀小試:
呼~~~有驚無險!
收工!
----------------------------------- 一些參照的資料 --------------------------------------
範例: https://aistudio.baidu.com/aistudio/projectdetail/1968542
conda的安裝: https://www.paddlepaddle.org.cn/documentation/docs/zh/install/conda/windows-conda.html
conda 安裝(要搜索套件時): https://blog.csdn.net/ALZFterry/article/details/108326563
conda cheatsheet(PDF): https://docs.conda.io/projects/conda/en/4.6.0/_downloads/52a95608c49671267e40c689e0bc00ca/conda-cheatsheet.pdf
範例:https://iter01.com/586897.html
留言
張貼留言