0

i tried to install the discord lib on my external debian server with

python3 -m pip install -U git+https://github.com/Rapptz/discord.py.git

the return is:

[...]

Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-oq4dl632/websockets
Storing debug log for failure in /root/.pip/pip.log

Full Output:

Downloading/unpacking git+https://github.com/Rapptz/discord.py.git
  Cloning https://github.com/Rapptz/discord.py.git to /tmp/pip-vu76dg6y-build
  Running setup.py (path:/tmp/pip-vu76dg6y-build/setup.py) egg_info for package from git+https://github.com/Rapptz/discord.py.git
    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'project_urls'
      warnings.warn(msg)
    /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)

Downloading/unpacking aiohttp>=3.6.0,<3.7.0 (from discord.py==1.4.0a2308-ge473f3c)
  Downloading aiohttp-3.6.2-py3-none-any.whl (441kB): 441kB downloaded
Downloading/unpacking websockets>=6.0,!=7.0,!=8.0,!=8.0.1,<9.0 (from discord.py==1.4.0a2308-ge473f3c)
  Downloading websockets-8.1.tar.gz (58kB): 58kB downloaded
  Running setup.py (path:/tmp/pip-build-ayxt1lcn/websockets/setup.py) egg_info for package websockets
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-build-ayxt1lcn/websockets/setup.py", line 12, in <module>
        long_description = (root_dir / 'README.rst').read_text(encoding='utf-8')
    AttributeError: 'PosixPath' object has no attribute 'read_text'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-build-ayxt1lcn/websockets/setup.py", line 12, in <module>

    long_description = (root_dir / 'README.rst').read_text(encoding='utf-8')

AttributeError: 'PosixPath' object has no attribute 'read_text'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-ayxt1lcn/websockets
Storing debug log for failure in /root/.pip/pip.log

if i tried to install the websockets (https://pypi.org/project/websockets/) i get this return:

[...]

Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-d5s2p_/websockets
Storing debug log for failure in /root/.pip/pip.log

the pip.log returns:

Skipping (...) because it is not compatible with this Python

so how can i install this?

Nutzernam3
  • 13
  • 4
  • And what is in the log `/root/.pip/pip.log`? – phd Apr 22 '20 at 15:11
  • The code 1 error is just an indicator that there was a problem, so it's difficult using only this to do anything to debug the issue. You may be able to see more details on the failure in the debug log file indicated to give you a better idea of what failed, where. – Fubar Apr 22 '20 at 15:12
  • ok thx so... Skipping (...) because it is not compatible with this Python – Nutzernam3 Apr 22 '20 at 15:18
  • What if you use `pip3` instead of `pip`? – AdamTL Apr 22 '20 at 15:27
  • @AdamTL pip3 ...Pythonversion 3.8 – Nutzernam3 Apr 22 '20 at 15:28
  • Please show the full output of the `python3 -m pip install -U git+https://github.com/Rapptz/discord.py.git` command. Don't leave something out with `[...]` – FlyingTeller Apr 22 '20 at 15:38

1 Answers1

1

Now that you have provided the full error message, it becomes clear that you are using python version 3.4 for the installation:

/usr/lib/python3.4/distutils/dist.py    #This is one line from your error

But aiohttp has a minimum required version of python 3.5, as you can also see in this github issue (which was for me the second result in google when I entered your error 'PosixPath' object has no attribute 'read_text')

You have tagged python 3.8 however, so you should check your setup, since python3 does not seem to be calling the python version you think it is calling

FlyingTeller
  • 9,736
  • 2
  • 24
  • 38