Blog
Python websockets installation is failed due to missing module named pathlib and also raised the exception that websockets requires Python >=3.4 but python 3.6 is already installed on fedora 26.
$ sudo pip install websockets WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead. Collecting websockets Downloading https://files.pythonhosted.org/packages/4b/c6/026da2eeed75a49dd0b72a0c7ed6ee5cb2943e396ca9753eabff7359b27b/websockets-5.0.1.tar.gz (68kB) 100% |████████████████████████████████| 71kB 617kB/s Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-aipVrb/websockets/setup.py", line 1, in import pathlib ImportError: No module named pathlib ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-aipVrb/websockets/ [user@localhost ~]$ sudo pip install pathlib WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead. Collecting pathlib Downloading https://files.pythonhosted.org/packages/ac/aa/9b065a76b9af472437a0059f77e8f962fe350438b927cb80184c32f075eb/pathlib-1.0.1.tar.gz (49kB) 100% |████████████████████████████████| 51kB 468kB/s Installing collected packages: pathlib Running setup.py install for pathlib ... done Successfully installed pathlib-1.0.1
$ sudo pip install websockets Collecting websockets Using cached https://files.pythonhosted.org/packages/4b/c6/026da2eeed75a49dd0b72a0c7ed6ee5cb2943e396ca9753eabff7359b27b/websockets-5.0.1.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-bm0uem/websockets/setup.py", line 24, in raise Exception("websockets requires Python >= 3.4.") Exception: websockets requires Python >= 3.4. ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-bm0uem/websockets/
try installing websockets using pip3
sudo pip3 install websocketsOutput:
sudo: pip3: command not found
If pip3 installation is failed, then try to install python3-pip
$ sudo dnf install python3-pip
if pip3 is installed, then python websockets can be installed using pip3 command.
try to reinstall pip3 if getting below error 'already installed,
$ sudo dnf install python3-pip Last metadata expiration check: 0:59:49 ago on Wed 08 Aug 2018 09:52:01 AM IST. Package python3-pip-9.0.3-2.fc28.noarch is already installed, skipping. Dependencies resolved. Nothing to do. Complete! $ pip3 --help -bash: pip3: command not found
$ sudo dnf reinstall python3-pipOutput:
$ sudo dnf reinstall python3-pip Last metadata expiration check: 1:00:25 ago on Wed 08 Aug 2018 09:52:01 AM IST. Dependencies resolved. ============================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================== Reinstalling: python3-pip noarch 9.0.3-2.fc28 updates 2.0 M Transaction Summary ============================================================================================================================================================== Total download size: 2.0 M Is this ok [y/N]: y Downloading Packages: python3-pip-9.0.3-2.fc28.noarch.rpm 641 kB/s | 2.0 MB 00:03 -------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 457 kB/s | 2.0 MB 00:04 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Reinstalling : python3-pip-9.0.3-2.fc28.noarch 1/2 Erasing : python3-pip-9.0.3-2.fc28.noarch 2/2 Running scriptlet: python3-pip-9.0.3-2.fc28.noarch 2/2 Verifying : python3-pip-9.0.3-2.fc28.noarch 1/2 Verifying : python3-pip-9.0.3-2.fc28.noarch 2/2 Reinstalled: python3-pip.noarch 9.0.3-2.fc28 Complete!
$ sudo pip3 install websocketsOutput:
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead. Collecting websockets Cache entry deserialization failed, entry ignored Downloading https://files.pythonhosted.org/packages/5c/fe/99aeaf97985585baefca8d56125ec828ef5549276324ec319b63a4da686d/websockets-6.0-cp36-cp36m-manylinux1_x86_64.whl (88kB) 100% |████████████████████████████████| 92kB 829kB/s Installing collected packages: websockets Successfully installed websockets-6.0« Previous Next »
Blog
Privacy Policy | Copyright2020 - All Rights Reserved. | Contact us
| Report website issues in Github
| Facebook page
| Google+ page