pR0Ps / slack-to-discord

Import a Slack export into a Discord server
https://pypi.org/project/slack-to-discord/
76 stars 11 forks source link

Cannot install on macos 11.6 with Python 3.6.8 #26

Closed oubiwann closed 1 year ago

oubiwann commented 1 year ago

When following the instructions on the README, namely pip3 install slack-to-discord, I get this error from pip:

WARNING: Ignoring invalid distribution -umpy (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -umpy (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
Collecting slack-to-discord
  Using cached slack_to_discord-1.1.4-py3-none-any.whl (16 kB)
Collecting urllib3<2.0.0,>=1.26.12
  Downloading urllib3-1.26.16-py2.py3-none-any.whl (143 kB)
     |████████████████████████████████| 143 kB 3.9 MB/s
Collecting slack-to-discord
  Using cached slack_to_discord-1.1.3-py3-none-any.whl (16 kB)
  Using cached slack_to_discord-1.1.2-py3-none-any.whl (16 kB)
  Using cached slack_to_discord-1.1.1-py3-none-any.whl (13 kB)
  Using cached slack_to_discord-1.1.0-py3-none-any.whl (13 kB)
  Using cached slack_to_discord-1.0.1-py3-none-any.whl (10 kB)
  Using cached slack_to_discord-1.0.0-py3-none-any.whl (10 kB)
ERROR: Cannot install slack-to-discord==1.0.0, slack-to-discord==1.0.1, slack-to-discord==1.1.0, slack-to-discord==1.1.1, slack-to-discord==1.1.2, slack-to-discord==1.1.3 and slack-to-discord==1.1.4 because these package versions have conflicting dependencies.

The conflict is caused by:
    slack-to-discord 1.1.4 depends on discord.py<3.0.0 and >=2.0.0
    slack-to-discord 1.1.3 depends on discord.py<3.0.0 and >=2.0.0
    slack-to-discord 1.1.2 depends on discord.py<3.0.0 and >=2.0.0
    slack-to-discord 1.1.1 depends on discord.py<3.0.0 and >=2.0.0
    slack-to-discord 1.1.0 depends on discord.py<3.0.0 and >=2.0.0
    slack-to-discord 1.0.1 depends on discord.py<3.0.0 and >=2.0.0
    slack-to-discord 1.0.0 depends on discord.py<3.0.0 and >=2.0.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
WARNING: Ignoring invalid distribution -umpy (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -umpy (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)

When attempting to install from the GH clone, pip3 install, I get this:

WARNING: Ignoring invalid distribution -umpy (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -umpy (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
Processing /Users/oubiwann/lab/lfe/slack-to-discord
  Preparing metadata (setup.py) ... done
ERROR: Could not find a version that satisfies the requirement discord.py<3.0.0,>=2.0.0 (from slack-to-discord) (from versions: 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.7.0, 0.8.0, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.16.4, 0.16.5, 0.16.6, 0.16.7, 0.16.8, 0.16.9, 0.16.10, 0.16.11, 0.16.12, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.4.0, 1.4.1, 1.4.2, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.7.2, 1.7.3)
ERROR: No matching distribution found for discord.py<3.0.0,>=2.0.0
WARNING: Ignoring invalid distribution -umpy (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
WARNING: Ignoring invalid distribution -umpy (/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages)
oubiwann commented 1 year ago

I tried this first:

    install_requires = [
        "discord.py==2.3.1",
        "urllib3==1.26.16",
    ],

But got the same error. I then set no version for discord.py, and it worked:

    install_requires = [
        "discord.py",
        "urllib3==1.26.16",
    ],

Though this can't really be considered anything more than a work-around.

oubiwann commented 1 year ago

It seems that the Python version in the setup.py doesn't actually work?

I tried installing with a non-macos Python (homebrew) at version 3.11 and it worked.

pR0Ps commented 1 year ago

Good catch, discord.py>=2.0.0 requires Python 3.8+ so I've updated the requirements of this package to match