Poetry adding package that i dont want

Im trying to stop poetry to not add discord.py, discord-py or any other versions as I am using py-cord

in the .replit file i added the ignoredPackages but it seems to be not looking at that

What should I do?

Did you tried to specify the dependencies in your pyproject.toml?

For example, specify each of them:

python = "^3.8"
py-cord = "^3.X"  # Insert the version you want

And, if discord.py or any other unwanted packages are listed in your pyproject.toml file, just remove them.
After making changes to your pyproject.toml , run poetry update to update your poetry.lock

The .replit file is more like used to specify the run command or configure the environment. It’s not used for managing package dependencies. So, the ignoredPackages in .replit won’t affect Poetry’s behavior.

It will however affect the upm, which calls poetry, and is all most users see of it when it guesses packages.

If that happens you can just disable UPM’s auto-install feature no?

You could, but IMO you should just disable auto-guessing as it’s the real issue here.

Click three dots and Show hidden files, then open .replit file.
Insert this near the top:

disableGuessImports = true
disableInstallBeforeRun= true

Then, remove the packages you don’t want with poetry remove pkg-name or the Packages tool.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.