1 anaconda
安装下一步略过 conda --version conda 4.12.0 conda list conda install python=3.6
anaconda镜像源
#查看Anaconda中已添加的镜像
conda config --show-sources
#增加一个新的镜像源地址
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
#移除镜像源
conda config --remove channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
不配置镜像源,直接安装的方式
conda install -c 镜像源地址 package
或者:
conda install --channel 镜像源地址 package
清华大学开源软件镜像站
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
3 anaconda安装python
#安装3.8
conda create -n py38 python=3.8 anaconda
切换
activate py38
deactivate
4 anaconda安装dlib
https://pypi.org/simple/dlib/
conda install -c conda-forge dlib(虽然能安装可能有问题)
安装openCV pip install opencv-contrib-python
安装cmake pip install cmake
安装boost pip install boost
安装 pip install dlib-19.19.0-cp38-cp38-win_amd64.whl.whl
安装face_recognition pip install face_recognition
5 opencv-python
pip install opencv-python
import cv2
img = cv2.imread("F:\images\Lena.jpg", 1)
cv2.imshow("1", img)
cv2.waitKey()
pip install numpy
6 flask安装
1.conda创建虚拟环境(有需要的话)
conda create -n your_env_name python=x.x
2.conda查看看虚拟环境
conda-env list
3.conda进入虚拟环境
conda activate your-env-name
4.安装flask
pip install flask
5.查看版本
import flask
print(flask.__version__)
6.版本收集——requirements.txt的收集
pip freeze > requirements.txt
7.环境配置
pip install -r requirements.txt
简单Web服务
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return "hello docker"
if __name__=='__main__' :
app.run()
|