pip3 install flask //python开发web框架pip3 install langchain //LLM开发框架pip3 install openai //LLMpip3 install wechatpy //微信接口开发包pip3 install pycryptodome //加解密包pip3 install pdfplumber //读取和处理pdfpip3 install streamlit //用于绘制 UI界面pip3 install pymilvus //向量数据库工具包pip3 install tiktoken //计算token数和费用pip3 install python-dotenv //环境配置加载
2、安装python安装包地址:https://www.python.org/ftp/python
安装版本:3.8.10(>=3.8.1&<4.0)
安装之前首先要安装各种依赖包
(资料图片)
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
接下来下载python3.8.10
wget https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tar.xz
然后解压
tar -xvJf Python-3.8.10.tar.xz
进入Python-3.8.10
cd Python-3.8.10
./configure prefix=/usr/local/python3
make && make install
接下来添加软连接
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
添加pip3连接
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
设置pip源,建议使用豆瓣源,能达30Mb/s
pip3 config set global.index-url http://pypi.douban.com/simple/pip3 config set install.trusted-host pypi.douban.com
3、安装pycharm忽略
4、部署向量数据库Milvus:https://www.milvus-io.com/overview
Pinecone:https://www.pinecone-io.com/
5、LLM密钥5.1、openai官网地址:https://openai.com/
5.2、Hugging Face官网地址:https://huggingface.co/
6、安装langChainpip install langchain
7、安装问题File "E:\python-projects\venv\lib\site-packages\numexpr_init**_.py", line 24, in from numexpr.interpreter import MAX_THREADS, use_vml, BLOCK_SIZE1 ImportError: DLL load failed while importing interpreter: 找不到指定的模块。**
解决办法:
通过从 https://www.lfd.uci.edu/~gohlke/pythonlibs/ 下载 numpy+mkl 包来修复它和 pip 从终端安装它(从下载的 whl 文件所在的位置)
下载适合您配置的正确版本。我使用 python3.6 所以我下载了 numpy‑1.19.5+mkl‑cp36‑cp36m‑win_amd64.whl
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the "ssl" module is compiled with OpenSSL 1.0.2k-fips 26 Jan 2017
解决办法:
//降低urllib版本
python3 -m pip install urllib3==1.26.6
标签: