pip 包整理

# create env
conda create -n pytorch python=3.7

# pytorch
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113

# cv2
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python

# cython
pip install cython

# pillow
pip install pillow

# matplotlib
pip install matplotlib

# termcolor
pip install termcolor

# cloudpickle
pip install cloudpickle

# tabulate
pip install tabulate

# tensorboard
pip install tensorboard

# tqdm
pip install tqdm

# yacs
pip install yacs

# mock
pip install mock

# fvcore
pip install fvcore

# pydot
pip install pydot

# wheel
pip install wheel

# future
pip install future

# lxml
pip install lxml -i https://pypi.tuna.tsinghua.edu.cn/simple

# labelme
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple labelme

# py to pyc
python -m py_compile train.py

# py to pyd
1. pip install cython
2. create setup.py file:
    from distutils.core import setup
    from Cython.Build import cythonize
    setup(
        name = 'Hello world app',
        ext_modules = cythonize("vgg.py"),
    )
3. cmd run :python setup.py build_ext
赞赏