สอบถามวิธีติดตั้งตัว module pythainlp ครับ

แนะนำ สอบถาม ภาษา C สำหรับผู้เริ่มต้น ภาษา Java ภาษา Python

Moderator: mindphp, ผู้ดูแลกระดาน

tatiya
PHP VIP Members
PHP VIP Members
โพสต์: 2845
ลงทะเบียนเมื่อ: 09/07/2018 9:35 am

สอบถามวิธีติดตั้งตัว module pythainlp ครับ

โพสต์ที่ยังไม่ได้อ่าน โดย tatiya »

ตอนนี้ผมกำลังทำงานเกี่ยวกับการที่ต้องใช้ มูดูล pythainlp ครับ เพื่อมาตัดคำนะครับ เพราะว่าผมตัดใช้คู่กันกับมูดูล wordcloud ผมใช้ระบบปฏิบัติการวินโดว์นะครับ
ผมได้ทำการติดตั้งลองดู โดยการติดตั้งผ่าน terminal บน Pycharm ด้วยคำสั่ง

โค้ด: เลือกทั้งหมด

pip install pythainlp
ผลลัพท์คือ
(venv) C:\Users\tatiy\PycharmProjects\roject_for_work>pip install wordcloud
Collecting wordcloud
Using cached https://files.pythonhosted.org/packages ... _amd64.whl
Collecting pillow (from wordcloud)
Using cached https://files.pythonhosted.org/packages ... _amd64.whl
Collecting numpy>=1.6.1 (from wordcloud)
Using cached https://files.pythonhosted.org/packages ... _amd64.whl
Installing collected packages: pillow, numpy, wordcloud
Successfully installed numpy-1.15.0 pillow-5.2.0 wordcloud-1.5.0
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

(venv) C:\Users\tatiy\PycharmProjects\roject_for_work>pip install matplotlib
Collecting matplotlib
Downloading https://files.pythonhosted.org/packages ... _amd64.whl (8.7MB)
100% |████████████████████████████████| 8.7MB 372kB/s
Collecting six>=1.10 (from matplotlib)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Requirement already satisfied: numpy>=1.7.1 in c:\users\tatiy\pycharmprojects\roject_for_work\venv\lib\site-packages (from matplotlib) (1.15.0)
Collecting python-dateutil>=2.1 (from matplotlib)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting cycler>=0.10 (from matplotlib)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting kiwisolver>=1.0.1 (from matplotlib)
Using cached https://files.pythonhosted.org/packages ... _amd64.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting pytz (from matplotlib)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Requirement already satisfied: setuptools in c:\users\tatiy\pycharmprojects\roject_for_work\venv\lib\site-packages\setuptools-39.1.0-py3.7.egg (from kiwisolver>=1.0.1->matplotlib) (3
9.1.0)
Installing collected packages: six, python-dateutil, cycler, kiwisolver, pyparsing, pytz, matplotlib
Successfully installed cycler-0.10.0 kiwisolver-1.0.1 matplotlib-2.2.3 pyparsing-2.2.0 python-dateutil-2.7.3 pytz-2018.5 six-1.11.0
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

(venv) C:\Users\tatiy\PycharmProjects\roject_for_work>pip install pythainlp
Collecting pythainlp
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting future>=0.16.0 (from pythainlp)
Using cached https://files.pythonhosted.org/packages ... 6.0.tar.gz
Collecting nltk>=3.2.2 (from pythainlp)
Using cached https://files.pythonhosted.org/packages ... -3.3.0.zip
Requirement already satisfied: pytz in c:\users\tatiy\pycharmprojects\roject_for_work\venv\lib\site-packages (from pythainlp) (2018.5)
Requirement already satisfied: six in c:\users\tatiy\pycharmprojects\roject_for_work\venv\lib\site-packages (from pythainlp) (1.11.0)
Collecting marisa-trie<=0.7.4 (from pythainlp)
Using cached https://files.pythonhosted.org/packages ... 7.4.tar.gz
Collecting dill (from pythainlp)
Using cached https://files.pythonhosted.org/packages ... 8.2.tar.gz
Collecting requests (from pythainlp)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting pyreadline>=1.7.1 (from dill->pythainlp)
Using cached https://files.pythonhosted.org/packages ... ne-2.1.zip
Collecting idna<2.8,>=2.5 (from requests->pythainlp)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Collecting certifi>=2017.4.17 (from requests->pythainlp)
Downloading https://files.pythonhosted.org/packages ... ne-any.whl (146kB)
100% |████████████████████████████████| 153kB 4.5kB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests->pythainlp)
Using cached https://files.pythonhosted.org/packages ... ne-any.whl
Requirement already satisfied: urllib3<1.24,>=1.21.1 in c:\users\tatiy\pycharmprojects\roject_for_work\venv\lib\site-packages (from requests->pythainlp) (1.23)
Installing collected packages: future, nltk, marisa-trie, pyreadline, dill, idna, certifi, chardet, requests, pythainlp
Running setup.py install for future ... done
Running setup.py install for nltk ... done
Running setup.py install for marisa-trie ... error
Complete output from command C:\Users\tatiy\PycharmProjects\roject_for_work\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tatiy\\AppData\\Local\
\Temp\\pip-install-y734ajjz\\marisa-trie\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" i
nstall --record C:\Users\tatiy\AppData\Local\Temp\pip-record-_cyfjhvm\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\tatiy\PycharmProject
s\roject_for_work\venv\include\site\python3.7\marisa-trie:
running install
running build
running build_clib
building 'libmarisa-trie' library
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visu ... uild-tools

----------------------------------------
Command "C:\Users\tatiy\PycharmProjects\roject_for_work\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\tatiy\\AppData\\Local\\Temp\\pip-install-y734a
jjz\\marisa-trie\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users
\tatiy\AppData\Local\Temp\pip-record-_cyfjhvm\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\tatiy\PycharmProjects\roject_for_work\venv\i
nclude\site\python3.7\marisa-trie" failed with error code 1 in C:\Users\tatiy\AppData\Local\Temp\pip-install-y734ajjz\marisa-trie\

You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.


มันลง ตัว marisa ไม่ได้ครับ มันขึ้น Eror ผมได้เปิด url ลองดู
Capture.PNG
ผมจะแก้ปัญหายังไงครับ
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41131
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: สอบถามวิธีติดตั้งตัว module pythainlp ครับ

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

ลองอัพเกรด pip แล้ว ลองติดตั้ง โมดูลใหม่ครับ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
tatiya
PHP VIP Members
PHP VIP Members
โพสต์: 2845
ลงทะเบียนเมื่อ: 09/07/2018 9:35 am

Re: สอบถามวิธีติดตั้งตัว module pythainlp ครับ

โพสต์ที่ยังไม่ได้อ่าน โดย tatiya »

mindphp เขียน:ลองอัพเกรด pip แล้ว ลองติดตั้ง โมดูลใหม่ครับ
ผมลองทำดูแล้วครับโดยใช้ code

โค้ด: เลือกทั้งหมด

python -m pip install -U pip
ผลลัพท์
Capture3.PNG
ก้เลยลองใช้ code นี้ครับ

โค้ด: เลือกทั้งหมด

python -m pip install --upgrade pip
ผลลัพท์คือ
Requirement already up-to-date: pip in c:\users\tatiy\pycharmprojects\roject_for_work\venv\lib\site-packages (18.0)

แต่พอลองติดตั้งใหม่แล้ว ก็เกิด ปัญหาเดิมครับ
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41131
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: สอบถามวิธีติดตั้งตัว module pythainlp ครับ

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

เช็คเวอร์ชั่นของ module ว่าใช้ กับ python เวอร์ชั่นไหน
ใช้เวอร์ชั่นให้ตรง ทุกโมดูล ที่เกี่ยวข้องกัน
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 40