Skip to content

Tag: pycharm

PyCharm CE does not recognize .pyx files

PyCharm Community Edition (CE) does not recognize few Cython files as shown in the picture below (with PyCharm red mark under the file name). Could you please advise me on what can I do ? Answer The PyCharm Community Edition does not support Cython. You should get PyCharm Professional Edition to get that feat…

Writing Arabic in Pycharm console

In PyCharm I have no problem in printing Arabic in the console, but the problem that I can’t write in Arabic. Instead it is written as weird symbols. How can I fix it? Answer It’s likely that you’re using some weird encoding, try to change your file encoding to UTF-8 or UTF-16: more info: https://…

__slots__ type annotations for Python / PyCharm

How can I provide type annotations for attributes which are defined via __slots__? E.g. for this class: (Python 2 compatible in a comment if possible (otherwise Python 3 only is fine), and also such that PyCharm can handle it (actually that is most important for me now).) Answer __slots__ only tells the type(…

ModuleNotFoundError when running script from Terminal

I have the following folder structure: app __init__.py utils __init__.py transform.py products __init__.py fish.py In fish.py I’m importing transform as following: import utils.transform. When I’m running fish.py from Pycharm, it works perfectly fine. However when I am running fish.py from the Ter…

Pycharm Can’t install TensorFlow

I cannot install tensorflow in pycharm on windows 10, though I have tried many different things: went to settings > project interpreter and tried clicking the green plus button to install it, gave me the error: non-zero exit code (1) and told me to try installing via pip in the command line, which was succ…