requirements.txt

Why does pip install requirements.txt install extra packages?

橙三吉。 提交于 2021-02-05 11:15:09
问题 I have a repository with an inflated requirements.tx that I'd like to clean up. Using pipreqs I've set my requirements.txt to be a minimal set of packages need for my repository. To test this, I setup a virtualenv to install the packages and then run all my unit tests to make sure they're satisfactory. virtualenv temp_venv --no-site-packages source temp_venv/bin/activate pip install -r requirements.txt Which runs fine, but I see that a whole bunch of extra packages are collected and installed

Install PyTorch from requirements.txt

百般思念 提交于 2021-02-04 15:24:50
问题 Torch documentation says use pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html to install the latest version of PyTorch. This works when I do it manually but when I add it to req.txt and do pip install -r req.txt , it fails and says ERROR: No matching distribution . Edit: adding the whole line from req.txt and error here. torch==1.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html torchvision==0.5.0+cpu -f https://download

Heroku not reading requirement.txt file

别等时光非礼了梦想. 提交于 2021-01-28 02:09:25
问题 I am trying to deploy my python flask app to heroku but it keeps crashing and complaining about bash: gunicorn: command not found . I have my requirement.txt file in the root folder where my Procfile is also located. My python code is located in src/server/ Procfile contains: web: gunicorn --pythonpath src/server/ route:app --preload I have gunicorn in my requirements file: Is there something i'm missing? gunicorn==19.8.1 Flask==0.12.2 Flask-Cache==0.13.1 Flask-Cors==3.0.2 Flask-MongoAlchemy=

Python google cloud function deployment failure - Madmom pip package

允我心安 提交于 2021-01-27 20:00:36
问题 I am trying to deploy a Python3.7 Google Cloud Function using the "madmom" python pip package, however specifying madmom==0.16.1 in requirements.txt causes a deployment failure. When I remove madmom from requirements.txt, but leave the other pip packages, the cloud function deploys fine. madmom pypi: https://pypi.org/project/madmom/ madmom github: https://github.com/CPJKU/madmom I a deploying the function from Google Cloud Function's online editor: https://console.cloud.google.com/functions

Python: How to detect unused packages and remove them

扶醉桌前 提交于 2021-01-26 20:36:34
问题 I use pip freeze > requirements.txt to gather all packages I installed. But after developing many days, some packages are now unused. How can I find these unused packages and remove them, to make my project more clear? 回答1: Inside Pycharm Go to code > inspect code Select Whole project option and click OK. In inspection results panel locate Package requirements section under Python (note that this section will be showed only if there is any requirements.txt or setup.py file). The section will

Python: How to detect unused packages and remove them

旧时模样 提交于 2021-01-26 20:36:32
问题 I use pip freeze > requirements.txt to gather all packages I installed. But after developing many days, some packages are now unused. How can I find these unused packages and remove them, to make my project more clear? 回答1: Inside Pycharm Go to code > inspect code Select Whole project option and click OK. In inspection results panel locate Package requirements section under Python (note that this section will be showed only if there is any requirements.txt or setup.py file). The section will

Python: How to detect unused packages and remove them

浪子不回头ぞ 提交于 2021-01-26 20:36:12
问题 I use pip freeze > requirements.txt to gather all packages I installed. But after developing many days, some packages are now unused. How can I find these unused packages and remove them, to make my project more clear? 回答1: Inside Pycharm Go to code > inspect code Select Whole project option and click OK. In inspection results panel locate Package requirements section under Python (note that this section will be showed only if there is any requirements.txt or setup.py file). The section will

Azure deployment not installing Python packages listed in requirements.txt

一曲冷凌霜 提交于 2021-01-01 04:55:09
问题 This is my first experience deploying a Flask web app to Azure. I followed this tutorial. The default demo app they have works fine for me. Afterwards, I pushed my Flask app via git. The log shows deployment was successful. However, when I browse the hosted app via link provided in "Application Properties", I get a 500 error as follows: The page cannot be displayed because an internal server error has occurred. Most likely causes: IIS received the request; however, an internal error occurred

Equivalent of `package.json' and `package-lock.json` for `pip`

旧时模样 提交于 2020-12-25 08:36:55
问题 Package managers for JavaScript like npm and yarn use a package.json to specify 'top-level' dependencies, and create a lock-file to keep track of the specific versions of all packages (i.e. top-level and sub-level dependencies) that are installed as a result. In addition, the package.json allows us to make a distinction between types of top-level dependencies, such as production and development . For Python , on the other hand, we have pip . I suppose the pip equivalent of a lock -file would

Equivalent of `package.json' and `package-lock.json` for `pip`

旧城冷巷雨未停 提交于 2020-12-25 08:36:15
问题 Package managers for JavaScript like npm and yarn use a package.json to specify 'top-level' dependencies, and create a lock-file to keep track of the specific versions of all packages (i.e. top-level and sub-level dependencies) that are installed as a result. In addition, the package.json allows us to make a distinction between types of top-level dependencies, such as production and development . For Python , on the other hand, we have pip . I suppose the pip equivalent of a lock -file would