Marking conda as installer for pip packages
See original GitHub issueAll of the python package recipes which have python -m pip install ...
or just pip install ...
create one problem. They install a file by the name ‘INSTALLER’ in the dist-info directory. For example:
$ cat /Users/nwani/m3/envs/test/lib/python3.7/site-packages/dbf-0.97.11.dist-info/INSTALLER
pip
This is bad, because the from a user’s perspective, when an end user does: conda install dbf this package is installed via ‘conda’ and not ‘pip’.
The upcoming release of pip will have a new function was_installed_by_pip():
This is going to be used for not telling the user to pip install --upgrade pip
if pip is not installed via pip. I was thinking of extending it to all packages not installed by pip pypa/pip#5605 .
So, what would you recommend, conda-forge? Should we:
- stop using
pip install
and use the old--single-version-externally-managed
- start doing
echo conda > /path/to/pkg-pkgversion.dist-info/INSTALLER
- add a patch to pip which adds an argument to mark the installer
- delete the INSTALLER file?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to make conda recognize pip installed python packages?
When trying to install scipy, conda wants to install numpy in parallel of pip installed numpy....? How to make various installed be recognized ......
Read more >Installing pip packages with Anaconda | HolyPython.com
Lots of major Python packages have instructions to install with Anaconda. It usually goes something like this: conda install libraryname.
Read more >Environments, Conda, Pip, aaaaah! | by Dennis Bakhuis
Conda is a popular package manager for Python (and many other languages) and gives you access practically all Python versions and packages. It ......
Read more >Managing packages - Anaconda Documentation
Installing a different package version¶ ... In the menu that appears, select Mark for specific version installation. If other versions are available for...
Read more >Add Python packages using the conda package manager
If the specific package you are looking for is available from anaconda.org (formerlly binstar.org), you can easily install it and required dependencies by...
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
This is tricky, as people use conda and pip together. So when someone “pip installs” something, we DO want pip to think that any already-there dependencies were installed by pip (or, I guess, just that they are installed). Which is why we’ve been installing stuff with pip in conda-build.
also – the theory is that pip might install packages that are built with tools other than setuptools – so we can have one front end to all python package builders/installers.
So if pip does grow a way to indicate whether a package is being managed by pip, it would be really nice if it could still install a package, but optionally say “don’t try to manage this one”. SO maybe a PR to pip is in order. (or a post-install hack)
Of course making sure pip knows it is not managing itself is a good idea – that could get ugly.
and I do like @jakirkham’s idea of a generic python “compiler” that could be managed in one place as these things change – could we add a
{{ installer("python") }}
instead?-CHB
I would be in favor of recording
conda
or something similar in theINSTALLER
file.