On 07/11/2019 19:39, Chris Angelico wrote:
On Fri, Nov 8, 2019 at 6:34 AM Tony van der Hoff <li...@vanderhoff.org> wrote:
On 07/11/2019 19:00, Chris Angelico wrote:
On Fri, Nov 8, 2019 at 5:47 AM tony van der Hoff <li...@vanderhoff.org> wrote:
Hi,
I'm attempting to install (among other things) the "http" module on my
debian10 box, and am encountering the following problem:
Can you link to the documentation for the package you're trying to
install? Python already ships with a module called "http". You don't
need to install it.
Thanks Chris, but it doesn't seem to be installed here, but maybe I'm
doing something stupid:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
Ah. I wouldn't call this "something stupid", because this is a bit of
a gotcha, but there is a small problem here. In your original post,
you attempted to install using "python3 -m pip", but here your shebang
just says "python", so you're running it in Python 2.7. Replace the
shebang with "python3" (and then drop the coding cookie - Python 3
assumes UTF-8 by default) and you should be able to run your code. (At
least the import lines you posted. No idea about anything else.)
ChrisA
Excellent catch, Chris. Thank you so much. I changed the version while
tracking down another problem, and forgot to restore it.
It should have been obvious, but somehow it escaped me.
Thanks again, Tony.
--
https://mail.python.org/mailman/listinfo/python-list