01 icon indicating copy to clipboard operation
01 copied to clipboard

Could not parse version constraint message - poetry intsall error on Ubuntu 22.04

Open nkeilar opened this issue 1 year ago • 2 comments

Describe the bug When trying to run poetry install on Ubuntu

To Reproduce Steps to reproduce the behavior:

  1. clone the repo
  2. cd 01/software
  3. poetry install

Then you're presented with something like this

Creating virtualenv 01os-D_8D354y-py3.10 in /home/username/.cache/pypoetry/virtualenvs
Installing dependencies from lock file

Could not parse version constraint: 6.8.0-40-generic

Expected behavior requirements to be installed, venv setup correctly on linux

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Python Version Python 3.10.12

nkeilar avatar Aug 18 '24 23:08 nkeilar

Okay. I found the issue

pyobjc = "*"

Apparently:

To install pyobjc on Ubuntu with Python 3.10, there are a few key things to understand:

1. pyobjc is a bridge between Python and Apple's Objective-C/Cocoa frameworks. It's specifically designed for macOS development.

2. Ubuntu is a Linux distribution, not macOS. The Apple frameworks that pyobjc relies on are not available on Ubuntu.

3. Because of this, you cannot directly install or use pyobjc on Ubuntu.

If you're trying to develop macOS applications using Python on Ubuntu, you'll need to consider alternative approaches. Here are a few options:

1. Use a macOS virtual machine on your Ubuntu system.
2. Use a cloud-based macOS development environment.
3. If your goal is cross-platform development, consider using a framework that works on both Ubuntu and macOS, such as PyQt or wxPython.

nkeilar avatar Aug 21 '24 03:08 nkeilar

I'm getting this on Debian. Does what you're saying mean it's not required for Linux? Can it just be commented out in pyproject.toml if I'm not trying to develop a macOS application?

sgjohnson1981 avatar Aug 25 '24 20:08 sgjohnson1981