`python setup.py install` doesn't seem to produce a useable install
lebigot opened this issue · comments
python setup.py install
ends for instance with
Installed …/miniforge3/envs/data_science/lib/python3.8/site-packages/marko-0.0.0-py3.8.egg
but import marko
in a Python script doesn't work (it doesn't find the package).
It would be useful to be able to install versions of the package from the git repository, before they are released on PyPI, and use bug fixes.
setup.py
is a dummy file, to make GitHub's dependabot work. In fact all PDM managed project has no way to install in editable mode from the direct url, before the editable install interface becomes finalized.
But you can install in non-editable mode:
$ pip install git+https://github.com/frostming/marko.git@master#egg=marko
Or manually clone and install:
$ git clone https://github.com/frostming/marko.git
$ cd marko
$ pip install .
Interesting. As this is still quite unusual that python setup.py install
doesn't work, I think that it would be useful to:
- Have a message printed in
setup.py
to that effect, especially since it seems to be doing something that's about correct. - Document in the main page how to install the latest version of marko.
What do you think?
Also python setup.py install
is a legacy approach to install a package. In the modern world you should always use pip install .
to do the work.
Ah, good point. Live and learn.
For those who started with Python way before its more recent popularity surge and didn't follow everything, documenting the manual install command(s) would still be useful.
PS: the second install command (with manual clone) could be simplified with pip install marko/
.