0

I use the same conda environment for many projects.

My conda env list:

absl-py==0.9.0
asgiref==3.2.5
astor==0.8.1
astroid==2.3.3
attrs==19.1.0
backcall==0.1.0
bleach==3.1.0
cachetools==4.0.0
certifi==2019.3.9
chardet==3.0.4
click==7.1.1
contextlib2==0.6.0.post1
cycler==0.10.0
Cython==0.29.15
decorator==4.4.0
defusedxml==0.6.0
Django==3.0.4
entrypoints==0.3
Flask==1.1.2
gast==0.2.2
google-auth==1.13.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.27.2
h5py==2.10.0
idna==2.9
image==1.5.28
image-slicer==0.3.0
ipywidgets==7.4.2
...

My project uses only some of them, and there are other files:

import flask
import numpy as np
import cv2
import os
import io
from PIL import Image
from flask import render_template, request, redirect, send_from_directory
from signature_extractor import extract_signature, transparent
from shadow import clean_shadow
import base64
import json

Normally, I use pip freeze > requirements.txt, but it too many dependencies that the project doesn't need.

How can I create requirements.txt with only dependencies that I use in a specific project?

huy
  • 1,648
  • 3
  • 14
  • 40

0 Answers0