0

I'm trying to import getch with python:

from getch import getch

But it gives me an error like:

ImportError: /opt/virtualenvs/python3/lib/python3.8/site-packages/getch.cpython-38-x86_64-linux-gnu.so: undefined symbol: Py_InitModule

Any idea how to solve this?

(I have installed getch already)

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
qiweunvjah
  • 96
  • 7

1 Answers1

1

Sounds related to this issue and the fact that getch was last updated in 2013 implying it is python 2 just like the issue. Try using python 2 or consider another package that doesn't have old c-bindings in it.

robcxyz
  • 68
  • 1
  • 6