#error using a virtualenv and importing default_permissions

1 messages · Page 1 of 1 (latest)

rugged scarab
#

i got this using an activated venv

Traceback (most recent call last):
  File "bot.py", line 2, in <module>
    from discord import default_permissions
ImportError: cannot import name 'default_permissions' from 'discord' (/home/debian/bot/rpBot/lib/python3.7/site-packages/discord/__init__.py)

it work on my windows i don't understand why it won't on my linux server

hot gate
#

are you setting PYTHONPATH?

tranquil oriole
#

With default_permissions

#

I fix it changing the Python Version

rugged scarab
#

i actually have python 3.7.3 and i'm running debian 10

rugged scarab
#

i installed python 3.10 but still get the same issue

Python 3.10.0 (default, May 22 2022, 12:50:26) [GCC 8.3.0] on linux                                       Type "help", "copyright", "credits" or "license" for more information.                                    >>> from discord import default_permissions          Traceback (most recent call last):                     File "<stdin>", line 1, in <module>                ImportError: cannot import name 'default_permissions' from 'discord' (/home/debian/bot/rpBot/lib/python3.10/site-packages/discord/__init__.py)                 >>> import discord                                   >>>
molten bough
#

you probably have the wrong version installed

#

install py-cord==2.0.0rc1

rugged scarab
hot gate
rugged scarab
hot gate
#

what did you mean here?
#general message

#

thought you updated to master

rugged scarab
#

yes
if i clone the master i get the 1.7.3 version
and the issue come again

hot gate
#

no, 1.7.3 is stable

#

what are you cloning?

rugged scarab
#

i made mistake, i didn't installed the cloned version but via pip instead

hot gate
#

?tag install

dreamy shellBOT
#
  1. Uninstall discord.py or any other forks of discord.py you might have with the namespace discord.
python -m pip uninstall discord.py discord -y
  1. Install py-cord
python -m pip install py-cord

Installing other builds:
Note: You need to have git installed. Use !git to find out how to install git.

Updating the module to Alpha (unstable):

pip install -U git+https://github.com/Pycord-Development/pycord

Updating to beta:

pip install py-cord==2.0.0b7
hot gate