PYTHONPATH itself is a bit of an anachronism :). It's the past, virtualenvs are the future! https://orbifold.xyz/pythonpath.html <https://orbifold.xyz/pythonpath.html>
(If you're using PyObjC and avoiding virtualenvs for that reason, check out https://github.com/glyph/venvdotapp <https://github.com/glyph/venvdotapp> ) -g > On Feb 13, 2018, at 9:51 AM, Gerrie Shults <gshu...@icloud.com> wrote: > > Thank you, Barry. Your PYTHONPATH suspicion was correct. > > I have been away from Python for many years. My PYTHONPATH pointed to > personal directories, which happened to include a 15-year old module named > ‘html’. > > Clearing that solved my problem. > > Thanks again, > Gerrie > >> On Feb 12, 2018, at 11:56, Barry Scott <ba...@barrys-emacs.org >> <mailto:ba...@barrys-emacs.org>> wrote: >> >> html module is shipped with python 3.6.4. >> >> Only thing I can think of is that your PYTHONPATH is interfering in some way. >> >> $ python3 >> Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) >> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import html >> >>> html >> <module 'html' from >> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/html/__init__.py'> >> >>> from html.parser import HTMLParser >> >>> HTMLParser >> <class 'html.parser.HTMLParser'> >> >>> import sys >> >>> sys.path >> ['', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', >> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6', >> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload', >> >> '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages'] >> >>> >> >> Barry >> >> >>> On 12 Feb 2018, at 16:05, Gerrie Shults <gshu...@icloud.com >>> <mailto:gshu...@icloud.com>> wrote: >>> >>> Before my original post, I looked up html.parser in the Python >>> documentation, and everything I saw indicated to me that it was already >>> installed. >>> >>> I have now looked again at the documentation and can find examples using >>> html.parser, but nothing that tells me how to install it. >>> >>> How do I install it? And how can I find what is already installed, and what >>> is available to install without having to download more? >>> >>> Thanks, >>> Gerrie Shults >>> >>>> On Feb 11, 2018, at 18:59, 樊佳亮 <fjl2...@163.com <mailto:fjl2...@163.com>> >>>> wrote: >>>> >>>> You should first install html.parser this error report is about html.parser >>>> Then rerun pip command >>>> >>>> 发自我的 iPhone >>>> >>>> 在 2018年2月12日,上午5:32,Gerrie Shults <gshu...@icloud.com >>>> <mailto:gshu...@icloud.com>> 写道: >>>> >>>>> I’m trying to get the latest version of pip to use to install Flask. >>>>> >>>>> I have a fresh install of Python 3.6.4, and I executed "pip3 install -U >>>>> pip”, per the instructions from "https://pip.pypa.io/en/stable/installing >>>>> <https://pip.pypa.io/en/stable/installing>/“, and got the result below. >>>>> >>>>> Why isn’t html.parser available as part of the standard install? What do >>>>> I need to do to make this work? >>>>> >>>>> Thanks for any help. >>>>> >>>>> Gerrie Shults >>>>> >>>>> >>>>> >>>>> >>>>> $ pip3 install -U pip >>>>> Traceback (most recent call last): >>>>> File "/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3", line >>>>> 7, in <module> >>>>> from pip import main >>>>> File >>>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/__init__.py", >>>>> line 28, in <module> >>>>> from pip.vcs import git, mercurial, subversion, bazaar # noqa >>>>> File >>>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/vcs/subversion.py", >>>>> line 9, in <module> >>>>> from pip.index import Link >>>>> File >>>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/index.py", >>>>> line 31, in <module> >>>>> from pip.wheel import Wheel, wheel_ext >>>>> File >>>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/wheel.py", >>>>> line 39, in <module> >>>>> from pip._vendor.distlib.scripts import ScriptMaker >>>>> File >>>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/distlib/scripts.py", >>>>> line 14, in <module> >>>>> from .compat import sysconfig, detect_encoding, ZipFile >>>>> File >>>>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/distlib/compat.py", >>>>> line 85, in <module> >>>>> from html.parser import HTMLParser >>>>> ModuleNotFoundError: No module named 'html.parser' >>>>> $ >>>>> >>>>> _______________________________________________ >>>>> Pythonmac-SIG maillist - Pythonmac-SIG@python.org >>>>> <mailto:Pythonmac-SIG@python.org> >>>>> https://mail.python.org/mailman/listinfo/pythonmac-sig >>>>> <https://mail.python.org/mailman/listinfo/pythonmac-sig> >>>>> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG >>>>> <https://mail.python.org/mailman/options/Pythonmac-SIG> >>>>> >>> >>> _______________________________________________ >>> Pythonmac-SIG maillist - Pythonmac-SIG@python.org >>> <mailto:Pythonmac-SIG@python.org> >>> https://mail.python.org/mailman/listinfo/pythonmac-sig >>> <https://mail.python.org/mailman/listinfo/pythonmac-sig> >>> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG >>> <https://mail.python.org/mailman/options/Pythonmac-SIG> >> > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > https://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org https://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG