It will only install the dependencies PyYAML, pandas and numpy. Now if we install the package normally ( pip install example from PyPI or pip install -e. Setup ( name = 'example', version = '0.1.0', packages = find_packages ( include = ), install_requires =, extras_require = ) Luckily setuptools allows to specify optional dependencies in extras_require: Want to install matplotlib nor jupyter on the machine (or container) where I train On the other hand, if the model runs in production I do not I may need to have matplotlib and jupyter installed in order to interactively work with the When I work on such a model interactively I often make packages which I use to train a model. ![]() Sometimes you may have dependencies that are only required in certain situations. Requirements will automatically be installed by pip when you install your package. You may specify requirements without a version ( PyYAML), pin a version ( pandas=0.23.3), specify a minimum Setup ( name = 'example', version = '0.1.0', packages = find_packages ( include = ), install_requires = ) Now all that you need to do in order to install your package is to run the followingįrom inside the example_project/ directory 3: Prevent the inclusion of tests in the package, but this is slightly ![]() Alternatively, you can also use the exclude argument to explicitly If you included an _init_.py in your tests/ĭirectory. ![]() Without any arguments, this can potentially result in unwanted packages toīe included. While you could in principle use find_packages()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |