Remove django from install_requires in setup.py
See original GitHub issueHi.
I’d like to propose to remove django
package from install_requires
in setup.py, because it successfully breaks package updates with pip install -U django-import-export
by installing the latest available django
version, which is not really desirable in most cases.
Most of mature packages e.g. djangorestframework provide empty install_requires
with install_requires=[]
to avoid any conflicts.
In my opinion, most users will have django
installed before installing django-import-export
and I assume that nobody would expect that the django-import-export
package would work without django
.
References:
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Install dependencies from setup.py - Stack Overflow
Just create requirements.txt in your lib folder and add all dependencies like this: gunicorn docutils>=0.3 lxml==0.5a7. Then create a setup.py script and ...
Read more >A Practical Guide to Using Setup.py - GoDataDriven
The key to setting up your project is the setup.py file. In this blog I'll go into the details of this file. Where...
Read more >install_requires vs requirements files
install_requires is a setuptools setup.py keyword that should be used to specify what a project minimally needs to run correctly.
Read more >How to Package Python dependencies with PIP setuptools
Learn step by step how to package a Python project with PIP ... it will install all of the dependencies listed in install_requires....
Read more >python setup.py uninstall - Intellipaat Community
Instead of using setup.py you should use pip install. You need to remove all the files manually and then undo any changes done...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually,
upgrade
can be used without forced recursive upgrade. As http://pip-python3.readthedocs.io/en/latest/user_guide.html#only-if-needed-recursive-upgrade states one can provide--upgrade-strategy
withonly-if-needed
value, which will effectively upgrade a dependency only if it does not satisfy the new parent requirements.Issue resolved for me.
TBH, this feels like an issue with how
pip
works and not an error in the django-import-export list of requirements. I think it would be better to spend effort fixing the issue there instead of suggesting every Django package workaround the issue by not enumerating its requirements correctly. Here is at least one pip related issue, https://github.com/pypa/pip/pull/3194Take a look at pip-tools. It removes the manual pinning process as well as syncs a virtualenv to a strict list of packages.