Search code examples
pythonpipmsvcrt

pip is not working error: "No module named 'msvcrt''


I uninstalled python3.4 and installed python3.9.2. Now pip is not working. python3 -m pip install is showing following error

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

Simple python codes are running. My OS is openSUSE Leap 42.3. I have another python2.7 installed. Any help will be appreciated.


Solution

  • It was about setting the path

    ln -s /usr/local/lib64/python3.9/lib-dynload/ /usr/local/lib/python3.9/lib-dynload
    

    This link was helpful.