Python install line standard
See original GitHub issueCan we establish a standard for how we do the whole python setup.py dance?
Please vote by posting a comment with the corresponding number. Majority after 1 week wins?
python setup.py install --single-version-externally-managed --record=record.txt
python setup.py install --single-version-externally-managed --root=/
python setup.py install --old-and-unmanageable
python -m pip install --no-deps .
pip install --no-deps .
I give up on strikethrough. 4 is out, due to error (https://travis-ci.org/conda-forge/staged-recipes/jobs/127374916#L405)
Issue Analytics
- State:
- Created 7 years ago
- Comments:51 (47 by maintainers)
Top Results From Across the Web
Installing Packages - Python Packaging User Guide - Python.org
Requirements for Installing Packages. Ensure you can run Python from the command line. Ensure you can run pip from the command line ·...
Read more >4. Using Python on Windows — Python 3.11.1 documentation
The Python Launcher for Windows will be installed according to the option at the bottom of the first page. The standard library, test...
Read more >Download Python - Python.org
Looking for 3rd party Python modules? · You can view the standard documentation online, or you can download it in HTML, PostScript, PDF...
Read more >Installing Python Modules — Python 3.11.1 documentation
The standard packaging tools are all designed to be used from the command line. The following command will install the latest version of...
Read more >Installing Python Modules (Legacy version) — Python 3.11.1 ...
Most Linux distributions include Python as a standard part of the system, so prefix and exec-prefix are usually both /usr on Linux. If...
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 seems core enough that we might want to build it right into conda/conda-build. It might make pip-installed packages work a little better with conda. Thanks for your insight, @minrk.
I’d go for 5. 4 also works if
--ignore-installed
is added. I think 4 doesn’t work as-is becausepython -m
seems to add.
to sys.path, whereaspip
alone doesn’t. That difference was awfully surprising.The disadvantage of 1-3 is that they all assume setuptools is imported in setup.py, whereas pip should do the right thing in both cases (mainly by importing setuptools itself). If a package doesn’t use setuptools, then you have to use
setup.py install
without the extra args in the conda recipe, and then if it starts importing setuptools you have to make sure that the recipe changes the setup.py args at the same time. If you use pip, the command in the recipe wouldn’t change.