Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module pkg_resources #2404

Open
AlvaroBadiaAlcaraz opened this issue Apr 27, 2024 · 6 comments
Open

No module pkg_resources #2404

AlvaroBadiaAlcaraz opened this issue Apr 27, 2024 · 6 comments

Comments

@AlvaroBadiaAlcaraz
Copy link

AlvaroBadiaAlcaraz commented Apr 27, 2024

Hello!

I am trying to install de project but when i try to execute de setup bat, the common_setup.py file returns an error about pkg_resources not being found.
I have checkes and the folder is in there. I know pkg_resources is deprecated but i cant find a solution that i can use in this project.

Anyone knows how to get around this?
Thank you!

@bmaltais
Copy link
Owner

Did you install the python.org release of python with the PATh checkbox selected as per the README instructions?

@DukeSniper
Copy link
Contributor

DukeSniper commented May 2, 2024

Having the same issue with a Python 3.12.3 (system wide install, PATH is properly set). setuptools package is installed, but upon entering the venv, it seems to be missing. Proposed solution would be to python -m pip install setuptools after activating the venv, as reinstalling the package in the venv fixed that issue for me

@bmaltais
Copy link
Owner

bmaltais commented May 2, 2024

You 100% have to use the version specified. 3.12.x will 100% not work.

@DukeSniper
Copy link
Contributor

DukeSniper commented May 3, 2024

Which the installer would be able to tell you if it didn't die first

I will need to check why it did not detect the wrong version… it is supposed to block installation if it detects an unsupported version.

@DukeSniper
Copy link
Contributor

DukeSniper commented May 3, 2024

It does detect the wrong Python version if it eventually executes the setup_windows.py. Which on a freshly created 3.12.x Python venv it simply cannot, because it dies before actual execution due to ModuleNotFoundError caused by the missing setuptools in the venv. You'd have to check the Python executable version in the setup.bat (good luck with that), put the import setup_common in a try/except or simply make sure that setuptools are available in the venv just as I proposed.

Please don't get me wrong. I'm not trying to say that my fix will magically make everything work on unsupported Python versions, it will just help ensure that your version checking code will actually have a chance to run and give a meaningful error message instead of a generic (and misleading) Python error

@ChristianMayer
Copy link

I have the same issue running Ubuntu 24.04.1 LTS that comes only with python 3.12

I think the fix from #2437 should be ported to Linux as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants