Open mrquangdt opened 2 years ago
@mrquangdt b chạy jupyter notebook: link github
Đây của mình là source code, ko phải file chạy luôn để chạy được bạn cần phải build được trước Step 0: đối với MAC OSX bạn cần cài đặt được brew trước đó nhé
Step 1: sau đó cài 2 gói thư viện sau brew install python3-dev brew install g++
Step 2: mở terminal lên cấu hình biến môi trường chú ý Cellar là tên user của mình, sẽ ko có trên máy tính của bạn bạn phải tự tìm ra đường dẫn tuyệt đối đến thư mục trên máy bạn
export PYTHON3_DEV_INCULE=/usr/local/Cellar/python@3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/include export PYTHON3_LIB_PATH=/usr/local/Cellar/python@3.9/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib export PYTHON3_LIB_NAME=python3.9 export GPP_COMPILER=g++
Step 3: cd đến thư mục source code mà make
hi,
Mình đã làm theo hướng dẫn,đến bước make thì báo lỗi này,a/c xem giúp e với ạ!
VietnameseTextNormalizer % make -j
$GPP_COMPILER -c -fPIC -O3 -Wall main.cpp -I$PYTHON3_DEV_INCULE -o ObjectPython3/main.o ;
/bin/sh: -c: command not found
make: *** [ObjectPython3/main.o] Error 127
bạn chưa setup giá trị cho biến môi trường GPP_COMPILER nhé bạn bạn cần chạy các câu lệnh export trước khi chạy câu lệnh make
Note: export chỉ có ý nghĩa tạm thời thôi, sau khi bạn close cái terminal là các biến export mất hết vì thế bạn cần chạy các câu lệnh export trước khi chạy câu lệnh make
@trantuanngoc hi bạn, mình chạy tới bước số 3 thì gặp lỗi như sau. Nhờ bạn hướng dẫn giúp ạ.
input >>> %env PYTHON3_DEV_INCULE=/usr/include/python3.7 %env GPP_COMPILER=g++ %cp -f MakefilePython3 Makefile
output >>> env: PYTHON3_DEV_INCULE=/usr/include/python3.7 env: GPP_COMPILER=g++ The system cannot find the file specified.
@langmaninternet hi anh Quang, em chạy thử thì báo lỗi không có module VietnameseTextNormalizer khi em import. Em đọc README thì thấy có note như hình bên dưới. Anh cho em hỏi file VietnameseTextNormalizer.so ở đâu vậy ạ? Em tìm hoài ko thấy.
@langmaninternet hi anh Quang, em chạy thử thì báo lỗi không có module VietnameseTextNormalizer khi em import. Em đọc README thì thấy có note như hình bên dưới. Anh cho em hỏi file VietnameseTextNormalizer.so ở đâu vậy ạ? Em tìm hoài ko thấy.
git này của anh là source code để build ra file VietnameseTextNormalizer.so em làm theo hướng dẫn build để ra file so nhé
Hi,
Bạn nào có thể hướng dẫn mình dùng thư viện này cho python với.
Mình không biết cài đặt thế nào trên môi trường ảo, nếu được cho mình chi tiết các lệnh thực hiện trên MacOS.
Tốt nhất là đóng gói thành gói để cài đặt theo kiểu:
conda install VietnameseTextNormalizer
hoặcpip install VietnameseTextNormalizer