-1

I have created setup.py for my project. Attached below. "-e" run setup.py file. May I write "-r requirements.txt" at the end so that I might create env including my requirements along with dependencies?

name: mypro

dependencies:
  - python==3.7
  - pip
  - matplotlib
  - opencv
  - cudnn
  - cudatoolkit==10.1.243
  - pip:
    - tensorflow-gpu==2.1.0rc1
    - lxml
    - tqdm
    - -e .
  • 3
    Does this answer your question? [What is setup.py?](https://stackoverflow.com/questions/1471994/what-is-setup-py) – Josh Correia Oct 21 '20 at 23:04

1 Answers1

0

setup.py file informs you about the module or package-dependencies you are about to install has been packaged and distributed with Distutils, which is the standard for distributing Python Modules.

This allows you to easily install Python package. The other way of installing packages/modules is by using pip.

Yes, you can install requirements.txt with all your modules by doing:

 pip install -r requirements.txt

Hope that helps

Note: You can also install and use your requirements.txt within a virtualenv if you want to run your python application separate from your main application, many tutorials online on how to do that as well.

de_classified
  • 1,927
  • 1
  • 15
  • 19