Granted I've been off PYTHON for two + years. I'm trying to get back into the swing, and I remember having command and variable completion available on windows a few years back. We were stuck in 2.6 as we had dependencies.
Today, I'm trying to import readline. I get this message from pip.
C:\Users\Joe>pip3 install readline Collecting readline Using cached https://files.pythonhosted.org/packages/f4/01/2cf081af8d880b44939a5f1b446551a7f8d59eae414277fd0c303757ff1b/readline-6.2.4.1.tar.gz Complete output from command python setup.py egg_info: error: this module is not meant to work on Windows
my version is:
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. import readline Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'readline'
I have recently faced the same issue on Windows 10. readline is not available for Windows, however there is pyreadline package which is for windows and you may try it.
$pip install pyreadline
or
$python -m pip install pyreadline
Then, in your python file do this:
from pyreadline import Readline
readline = Readline()
Go to your CMD terminal and type
pip install pyreadline
with in few seconds it will be installed and you will be able to see message ie "Successfully installed pyreadline-"
then go back to your PYSPARK terminal and type again import readline it will import now without any error
Thanks
Granted I've been off PYTHON for two + years. I'm trying to get back into the swing, and I remember having command and variable completion available on windows a few years back. We were stuck in 2.6 as we had dependencies.
Today, I'm trying to import readline. I get this message from pip.
C:\\Users\\Joe>pip3 install readline Collecting readline Using cached https://files.pythonhosted.org/packages/f4/01/2cf081af8d880b44939a5f1b446551a7f8d59eae414277fd0c303757ff1b/readline-6.2.4.1.tar.gz Complete output from command python setup.py egg_info: error: this module is not meant to work on Windows
my version is:
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. import readline Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'readline'
I tried pyreadline after finding this question and had problems and eventually found that it is no longer supported.
What worked for me was installing pyreadline3 with:
pip install pyreadline3
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.