How to solve “Unresolved import: HTML” in Python Development?

后端 未结 2 1550
粉色の甜心
粉色の甜心 2021-01-29 02:27

I\'m starting to learn about python development in a new project. I got setup almost everything right, but only this import HTML that keeps given me some error that

相关标签:
2条回答
  • 2021-01-29 02:38

    Looking the given screenshots and tags I suppose your are using Anaconda (which I have no experience but it is still Python, anyway) and the IDE is not resolving the import.

    1. Make sure you have installed/updated HTML.py

      conda install HTML
      
    2. At your IDE go to Window > Preferences > Python Interpreter

    3. At Libraries tab make sure you have the following folders added to your PYTHONPATH:

      • C:\Anaconda\Lib
      • C:\Anaconda\Lib\site-packages
      • C:\Anaconda\Scripts

    That should do the trick.

    Important: try to always install your libraries through conda (or pip when using Python directly). It will install things where it should be. ;)

    0 讨论(0)
  • 2021-01-29 02:57

    It looks like you are using anaconda, have you tried installing it the anaconda way?

    conda install HTML
    

    Also do you by any chance have 2 version of Python on your system?

    If the package is unavailable you'll have to user pip. If you don't have pip, from your command line write:

    python get-pip.py
    pip install HTML
    
    0 讨论(0)
提交回复
热议问题