I'm trying to host a bot on repl.it, and when I was trying to run the bot this error message was shown:
File "main.py", line 2, in <module>
import discord
ModuleNotFoundError: No module named 'discord'
This seemed weird to me as my code worked perfectly fine last time I tried to run it.
I did some further investigating and found that discord.py has a dependency called aiohttp
, so I tried to install the package myself, and then this happened:
Using version ^3.8.1 for aiohttp
Updating dependencies
Resolving dependencies...
SolverProblemError
Because discord.py (1.7.3) depends on aiohttp (>=3.6.0,<3.8.0)
and no versions of discord.py match >1.7.3,<2.0.0, discord.py (>=1.7.3,<2.0.0) requires aiohttp (>=3.6.0,<3.8.0).
So, because basically-another-discordpy-bot depends on both discord.py (^1.7.3) and aiohttp (^3.8.1), version solving failed.
at /opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/puzzle/solver.py:241 in _solve
237│ packages = result.packages
238│ except OverrideNeeded as e:
239│ return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
240│ except SolveFailure as e:
→ 241│ raise SolverProblemError(e)
242│
243│ results = dict(
244│ depth_first_search(
245│ PackageNode(self._package, packages), aggregate_package_nodes
exit status 1
Replit: Package operation failed.
What is happening here and how can I fix it?