Eu apenas mudei meu sistema operacional para o Ubuntu 16.04 (pela primeira vez usando linux).
Eu consegui instalar o Python 3.6 seguindo este guia:
link
E eu instalei o pip seguindo a resposta encontrada neste encadeamento de estouro de pilha:
link
Tudo funcionou como um encanto, no entanto, quando tento instalar o módulo discord.py usando python3.6 -m pip install -U discord.py
, recebi um erro de permissão em tudo que ele tenta instalar.
Collecting discord.py
Collecting aiohttp<1.1.0,>=1.0.0 (from discord.py)
Collecting websockets<4.0,>=3.1 (from discord.py)
Using cached websockets-3.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting chardet (from aiohttp<1.1.0,>=1.0.0->discord.py)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting multidict>=2.0 (from aiohttp<1.1.0,>=1.0.0->discord.py)
Using cached multidict-3.1.3-cp36-cp36m-manylinux1_x86_64.whl
Collecting async-timeout (from aiohttp<1.1.0,>=1.0.0->discord.py)
Using cached async_timeout-1.3.0-py3-none-any.whl
Installing collected packages: chardet, multidict, async-timeout, aiohttp, websockets, discord.py
Found existing installation: chardet 2.3.0
Uninstalling chardet-2.3.0:
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/shutil.py", line 544, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist- packages/chardet' -> '/tmp/pip-kssx4kah-uninstall/usr/lib/python3/dist- packages/chardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python3.6/dist-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/local/lib/python3.6/dist-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python3.6/dist-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python3.6/dist-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/local/lib/python3.6/dist-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib/python3.6/shutil.py", line 556, in move
rmtree(src)
File "/usr/lib/python3.6/shutil.py", line 480, in rmtree
_ rmtree_safe_fd(fd, path, onerror)
File "/usr/lib/python3.6/shutil.py", line 438, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File "/usr/lib/python3.6/shutil.py", line 436, in _rmtree_safe_fd
os.unlink(name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'jpcntx.py'
Esta é apenas uma das mensagens de erro que recebo. Também obtenho outras como
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/websockets'
e
PermissionError: [Errno 13] Permission denied: /usr/local/lib/python3.6/dist-packages/async_timeout
bem como
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/multidict-3.1.3.dist-info'