WildStriker / WildCogs

My Cogs for Red-DiscordBot V3
GNU General Public License v3.0
6 stars 4 forks source link

Cairo Issue #3

Open Habchy opened 4 years ago

Habchy commented 4 years ago

I keep getting ModuleNotFoundError: No module named 'cairo' when I try to load the cog.

I'm running: Redbot v3.3.9 Python 3.8.3

I have GTK+, pkg-config I'm also running Windows 10

Any help would be great.

WildStriker commented 4 years ago

Hi Habchy,

I spun up a new virtual machine to test this from scratch and did not appear to have any issues installing the 64 bit variant. I have not tested the 32 bit version but I expect it should work the same, and in most cases you probably want to use 64 bit version anyways.

Assuming everything is installed correctly, my only guess at this point is you may need restart Red in a new Command Prompt (or Power Shell) console. The reason for this is GTK will update the PATH environment variable and the console running Red will not be aware of this and can therefore not find the lib is needs for cairo.

Troubleshooting Steps:

If this is still not working here is a few things I can think of that could be a potentially cause this issue:

Incompatible Python, GTK installs, in most cases you probably want to install 64 bit for both.

System PATH issues:

Installation Steps:

If it helps here is some steps I did from a clean install (Windows 10 64 bit):

  1. Follow instructions provided: https://docs.discord.red/en/stable/install_windows.html
  2. Install Cog:
    • [p]repo add wildcogs https://github.com/WildStriker/WildCogs master
    • [p]cog install wildcogs chessgame
  3. Install GTK:

Important After installing GTK it will update your System PATH, because of this you will need to reload the Command Prompt console as it will not be aware of this change

At this point once everything is installed and you are running Red in a new Command Prompt window you should be able to load the cog with [p]load chessgame