Poetry version solving failed

How to resolve version solving in my situation?
I will be grateful for some help! :sweat_smile:

Screenshots, links, or other helpful context:

--> poetry add tiktoken typing-extensions colorama loguru pycryptodome pycryptodomex duckduckgo-search openai quickjs launchdarkly-server-sdk os-sys selenium aiohttp numpy flask flask-cors werkzeug pillow platformdirs undetected-chromedriver browser-cookie3 waitress nest-asyncio
Using version ^0.5.1 for tiktoken
Using version ^4.8.0 for typing-extensions
Using version ^0.4.6 for colorama
Using version ^0.7.2 for loguru
Using version ^3.19.0 for pycryptodome
Using version ^3.19.0 for pycryptodomex
Using version ^3.9.3 for duckduckgo-search
Using version ^0.28.1 for openai
Using version ^1.19.2 for quickjs
Using version ^9.0.1 for launchdarkly-server-sdk
Using version ^2.1.4 for os-sys
Using version ^4.14.0 for selenium
Using version ^3.8.6 for aiohttp
Using version ^1.26.1 for numpy
Using version ^3.0.0 for flask
Using version ^4.0.0 for flask-cors
Using version ^3.0.1 for werkzeug
Using version ^10.1.0 for pillow
Using version ^3.11.0 for platformdirs
Using version ^3.5.3 for undetected-chromedriver
Using version ^0.19.1 for browser-cookie3
Using version ^2.1.2 for waitress
Using version ^1.5.8 for nest-asyncio

Updating dependencies
Resolving dependencies...

Because no versions of os-sys match >2.1.4,<3.0.0
 and os-sys (2.1.4) depends on pythonGui (*), os-sys (>=2.1.4,<3.0.0) requires pythonGui (*).
So, because no versions of pythongui match *
 and python-template depends on os-sys (^2.1.4), version solving failed.

Let me break this down.
You are trying to install the package os-sys, poetry tries to get version 2.1.4. This package depends on another package called pythonGui, at any version. However, the package pythonGui does not exist (or at least doesn’t exist anymore).
So, to resolve this, you have two options:

  1. Stop using os-sys, remove it from your project’s dependencies. It is probably an outdated, unmaintained package.
  2. If os-sys has any version that does not use pythonGui (probably not the case), then you could install a downgraded version.

Hello, if this problem has been solved you can mark my post as solution so that others are aware.
Otherwise, you ask any further questions.


I have encountered the same issue and I have no idea where it comes from. There is not a single mention of os-sys or pythongui in my entire project. No where in poetry, not in poetry.lock or pyproject.toml or requirements.txt or anywhere else for that matter.

I am unable, therefore, to uninstall any dependencies on it because I don’t know where it comes from and neither does poetry.

My repl has been running completely fine until now, and I am not sure what’s going on.

Any help would be appreciated,

this is because replit is “auto-guessing” which packages you might use by what import statements are in your code.
(If you could provide the import names that are leading to os-sys or pythongui, that would be great).
The replit team is going to fix some issues regarding this, but in the meantime, disable auto guessing with this:
Click three dots, show hidden files, open .replit file. Anywhere near the top, such as underneath entrypoint variable, add this:

disableGuessImports = true

I think this problem will be fixed or improved soon:

1 Like


Thanks for the quick response, here is what it shows in the console after running:

--> poetry add django-tts aiohttp bitdust os-sys requests python-dotenv data
Using version ^0.3.1 for django-tts
Using version ^3.9.1 for aiohttp
Using version ^0.1.8 for bitdust
Using version ^2.1.4 for os-sys
Using version ^2.31.0 for requests
Using version ^1.0.0 for python-dotenv
Using version ^0.4 for data

Updating dependencies
Resolving dependencies...


  Because no versions of os-sys match >2.1.4,<3.0.0
   and os-sys (2.1.4) depends on pythonGui (*), os-sys (>=2.1.4,<3.0.0) requires pythonGui (*).
  So, because no versions of pythongui match *
   and python-template depends on os-sys (^2.1.4), version solving failed.

  at venv/lib/python3.10/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)
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes
exit status 1

(if that doesn’t look like code, sorry Im not sure how to do that)

Weirdly enough, the repl started working now despite this error, so i’m not sure why it wasn’t working earlier.


Hello, it looks like replit is indeed trying to install at least 4 random packages, but note that since you don’t actually need these packages, your code may still run fine even if version solving fails.
These are the import names and their corresponding packages:

tts: django-tts
chat: bitdust
server: os-sys
data: data

Look familiar?

So, the disableGuessImports = true should work to disable UPM auto guessing. Since it looks like it doesn’t work, also try this:
Under the disableGuessImports, add this:

disableInstallBeforeRun = true

Then, go down to where it says [packager.features] and set guessImports to false. Then refresh.
If it still doesn’t work for some reason, you have a few options:
-Move everything to a new repl, because your current repl seems to have outdated configuration that may be buggy. Download as zip to transfer everything easier (do not copy .replit or replit.nix).
-you can break replit’s UPM (the default package manager) by deleting the contents of .upm/store.json, then you must use poetry add and poetry remove commands for package management.
-wait till they fix the buggy import guessing, in the topic linked in my other post

1 Like


Thanks for the help, I deleted the other comment because my code was not running even when using disableGuessImports = true, but I noticed that that’s because after running it once and pressing stop, it still had something running in the interpreter meaning I had to type in ‘kill 1’ in the shell and then run again for it to work.

The same thing was happening without disableGuessImports actually and normally it would still run despite the version solving failing.

Thanks for the help either way, everything is up and running now!

1 Like

I got the same issue, I tried all solutions mentioned here but it did not work.
What the hell is this os-sys issue? :frowning:

it seems like replit trying to import unnecessary things by ‘guessing’, so as NuclearPasta said you should go into the ‘.replit’ file and place this code disableInstallBeforeRun = true into the place he said to put it

Prefer disableGuessImports = true over the other option, but you can use both.
Show hidden files, open .replit file, insert both options underneath entrypoint variable, refresh. (If you are using unit tests there is a different solution.)

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