How to handle '-' in the 'from' part in a "from import" statement?

Chris Angelico rosuav at gmail.com
Tue Oct 8 22:09:25 EDT 2019


On Wed, Oct 9, 2019 at 12:56 PM DL Neil via Python-list
<python-list at python.org> wrote:
>
> On 9/10/19 2:46 PM, Chris Angelico wrote:
> > On Wed, Oct 9, 2019 at 12:36 PM DL Neil via Python-list
> > <python-list at python.org> wrote:
> ...
>
> > (Or just using pip to install directly from GitHub, although not
> > everyone knows that that's possible.)
>
> Come on, you just knew I was going to ask how...
>

https://pip.pypa.io/en/stable/reference/pip_install/#git

It should be as easy as:

pip install git+https://github.com/USER/REPO

There are lots of other options if you need them (eg "@branchname")
but if you just want to grab the latest unversioned code, it should be
that simple.

ChrisA



More information about the Python-list mailing list