pythonpippyautogui

No Module Named 'Symbol'


I have problem with my pip . Lately I was getting error when I was trying to install any packages The Error was: ( Pyautogui )

Traceback (most recent call last):
  File "C:\Users\rati_\OneDrive\Desktop\PyAutoGUI-0.9.53.tar\PyAutoGUI-0.9.53\PyAutoGUI-0.9.53\setup.py", line 4, in <module>
    from setuptools import setup
  File "C:\Users\rati_\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 12, in <module>
    from setuptools.extension import Extension
  File "C:\Users\rati_\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\extension.py", line 7, in <module>
    from setuptools.dist import _get_unpatched
  File "C:\Users\rati_\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\dist.py", line 16, in <module>
    import pkg_resources
  File "C:\Users\rati_\AppData\Local\Programs\Python\Python310\lib\site-packages\pkg_resources.py", line 29, in <module>
    import symbol
ModuleNotFoundError: No module named 'symbol'

I reinstalled pip , python but couldn't fix the error ... There was no information online so I couldn't fix it. Any Tips?


Solution

  • Module symbol was a part of the standard library since the dawn of time. It was declared deprecated in Python 3.9 and finally removed in 3.10. For Python 3.10 one has to upgrade any 3rd-party library that imports symbol. In your case the libraries are pip/setuptools:

    pip install --upgrade pip setuptools
    

    If upgrade is not possible or there is no newer version of libraries updated for Python 3.10 the only solution is to downgrade Python.