Aug-05-2018, 01:26 PM
Hi all! I have a double boot 64 bits computer. With Linux I cannot import msvcrt or click. What to do on Linux ? I tried "sudo apt-get install msvcrt" without success. Same for "click".
can import msvcrt and click on windows but not on Linux
|
Aug-05-2018, 01:26 PM
Hi all! I have a double boot 64 bits computer. With Linux I cannot import msvcrt or click. What to do on Linux ? I tried "sudo apt-get install msvcrt" without success. Same for "click".
Aug-05-2018, 02:45 PM
One doesn't use msvcrt in linux. You need to use linux tools.
msvcrt is Windows only,can use getch which is a rewrite for Linux.
Click is normal install via pip. # Newest pip is now 18.0 | pip install --upgrade pip mint@mint ~ $ pip -V pip 18.0 from /home/mint/.pyenv/versions/3.7.0/lib/python3.7/site-packages/pip (python 3.7) mint@mint ~ $ pip install getch Collecting getch Downloading ..... Installing collected packages: getch Running setup.py install for getch ... done Successfully installed getch-1.0 # Test mint@mint ~ $ ptpython >>> import getch >>> >>> char = getch.getch() >>> char 'f' mint@mint ~ $ pip install click Collecting click ............... Successfully installed docopt-0.6.2 jedi-0.12.1 parso-0.3.1 prompt-toolkit-1.0.15 ptpython-0.41 pygments-2.2.0 six-1.11.0 wcwidth-0.1.7 # Test mint@mint ~ $ ptpython >>> import click >>> click.__version__ '6.7' >>> exit()
Aug-06-2018, 07:57 AM
Thanks for your help. I must tell you, since I did not succeed to make python3 the default language, the default language is 2.7(in Linux), so with click I installed with "sudo pip install click" I got : "successfully installed click 6.7" but it works only if I am on python2.7.
Another disagreeable thing I must tell you is that I loose my connexion to python forum each time I change my OS(from windows to Linux, and vice-versa). And logging once again is really tiring.
Aug-06-2018, 08:28 AM
Use
sudo pip3 install click to install it for python 3.
|
|