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

Cannot install wasabi2d on a Mac, despite Python 3.8.10 #77

Open
dcbb opened this issue Mar 7, 2023 · 15 comments
Open

Cannot install wasabi2d on a Mac, despite Python 3.8.10 #77

dcbb opened this issue Mar 7, 2023 · 15 comments

Comments

@dcbb
Copy link

dcbb commented Mar 7, 2023

I'm not able to pip install wasabi2d. I'm on a Mac, working with Pipenv.

Following a comment on issue #74 , I created an environment with Python 3.8.10 and verified that I have installed exactly this version, but that does not work either.

As far as I understand the output, the required pygame version 2.0.0.dev10 is not available, but I'm really not an expert in Python packaging.

In the many lines of output, the following ones look relevant:

The conflict is caused by:
    wasabi2d 1.4.0 depends on pygame==2.0.0.dev10
    wasabi2d 1.3.0 depends on pygame==2.0.0.dev6
    wasabi2d 1.2.0 depends on pygame==2.0.0.dev3
    wasabi2d 1.1.0 depends on pygame==2.0.0.dev3
    wasabi2d 1.0.0 depends on pygame==2.0.0.dev3

Has anyone succeeded in running wasabi2d on a Mac?

@dcbb dcbb changed the title Cannot install wasabi2d Cannot install wasabi2d on a Mac, despite Python 3.8.10 Mar 7, 2023
@BitPigeon
Copy link

Do you have the newest version of pygame? You can update it with pip install -U pygame.

@dcbb
Copy link
Author

dcbb commented Mar 7, 2023

I just tried again, to be sure.

Inside my Python 3.8.10 environment, I did a pip install -U pygame, which installs pygame-2.2.0.

I then tried pip install wasabi2d, but I get exactly the errors I reported.

@dcbb
Copy link
Author

dcbb commented Mar 7, 2023

When I try this in my environment:

pip install --force-reinstall -v "wasabi2d==1.4.0"

... it tells me the following, which sounds to me like it explicitly wants pygame==2.0.0.dev10, which somehow does not seem to exist.

ERROR: Could not find a version that satisfies the requirement pygame==2.0.0.dev10 (from wasabi2d) (from versions: 1.9.2rc1, 1.9.2, 1.9.3, 1.9.4.dev0, 1.9.4rc1, 1.9.4, 1.9.5rc1, 1.9.5rc2, 1.9.5, 1.9.6rc1, 1.9.6rc2, 1.9.6, 2.0.0.dev12, 2.0.0.dev14, 2.0.0.dev16, 2.0.0.dev18, 2.0.0.dev20, 2.0.0.dev22, 2.0.0.dev24, 2.0.0, 2.0.1.dev1, 2.0.1, 2.0.2.dev4, 2.0.2, 2.0.3.dev4, 2.0.3.dev6, 2.0.3, 2.1.0.dev2, 2.1.0, 2.1.1.dev2, 2.1.1.dev4, 2.1.1, 2.1.2, 2.1.3.dev6, 2.1.3.dev8, 2.1.3, 2.2.0.dev2, 2.2.0, 2.3.0.dev2)
ERROR: No matching distribution found for pygame==2.0.0.dev10

@BitPigeon
Copy link

I think it might have to do with this line in requirements.txt:

pygame~=2.1

@BitPigeon
Copy link

BitPigeon commented Mar 7, 2023

Try uninstalling pygame and using pip install pygame==2.0.0.

@dcbb
Copy link
Author

dcbb commented Mar 7, 2023

Sadly, this does not work.

pip install pygame==2.0.0 dies with an exception.

pip install pygame~=2.0.0 installs 2.0.3 which gives the same errors when installing Wasabi.

I fundamentally don't get this package stuff. As you say, requirements.txt states pygame~=2.1, which I can install. But then wasabi still fails, asking for pygame==2.0.0.dev10.

@BitPigeon
Copy link

I wonder why it would want 2.0.0.dev10? There is multiple problems with that:

  1. 2.0.0.dev10 is not an actual release (https://pypi.org/project/pygame/#history)
  2. If it was a release it would be a pre-release

@dcbb
Copy link
Author

dcbb commented Mar 8, 2023

I have no idea! Here's a complete shell output from an attempt with pip install wasabi2s --no-cache-dir. Cache disabled to be sure everything is downloaded fresh. Python is 3.8.10, as you can see below. (I replaced my username with xxx).

xxx@XRYC7TR2C6 wasabi % pipenv shell
Creating a virtualenv for this project...
Pipfile: /Users/xxx/dev/wasabi/Pipfile
Using /Users/xxx/.pyenv/versions/3.8.10/bin/python3.8 (3.8.10) to create virtualenv...
⠸ Creating virtual environment...created virtual environment CPython3.8.10.final.0-64 in 168ms
  creator CPython3Posix(dest=/Users/xxx/.local/share/virtualenvs/wasabi-4XWOOm8K, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/xxx/Library/Application Support/virtualenv)
    added seed packages: pip==23.0.1, setuptools==67.2.0, wheel==0.38.4
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment! 
Virtualenv location: /Users/xxx/.local/share/virtualenvs/wasabi-4XWOOm8K
Launching subshell in virtual environment...
Restored session: Mi  8 Mär 2023 16:23:03 CET
 . /Users/xxx/.local/share/virtualenvs/wasabi-4XWOOm8K/bin/activate                                                                                            
xxx@XRYC7TR2C6 wasabi %  . /Users/xxx/.local/share/virtualenvs/wasabi-4XWOOm8K/bin/activate
(wasabi) xxx@XRYC7TR2C6 wasabi % pip install wasabi2d --no-cache-dir                                            
Collecting wasabi2d
  Downloading wasabi2d-1.4.0-py3-none-any.whl (298 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.6/298.6 kB 5.2 MB/s eta 0:00:00
Collecting sortedcontainers
  Downloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting wasabi2d
  Downloading wasabi2d-1.3.0-py3-none-any.whl (259 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 259.5/259.5 kB 14.0 MB/s eta 0:00:00
Collecting moderngl<5.6,>=5.5.4
  Downloading moderngl-5.5.4.tar.gz (115 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.3/115.3 kB 321.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting mapbox-earcut==0.12.*
  Downloading mapbox_earcut-0.12.11.tar.gz (11 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pyrr
  Downloading pyrr-0.10.3-py3-none-any.whl (46 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.8/46.8 kB 15.2 MB/s eta 0:00:00
Collecting wasabi2d
  Downloading wasabi2d-1.2.0-py3-none-any.whl (248 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 248.5/248.5 kB 15.9 MB/s eta 0:00:00
  Downloading wasabi2d-1.1.0-py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.6/247.6 kB 15.0 MB/s eta 0:00:00
  Downloading wasabi2d-1.0.0-py3-none-any.whl (248 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 248.6/248.6 kB 14.3 MB/s eta 0:00:00
ERROR: Cannot install wasabi2d==1.0.0, wasabi2d==1.1.0, wasabi2d==1.2.0, wasabi2d==1.3.0 and wasabi2d==1.4.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    wasabi2d 1.4.0 depends on pygame==2.0.0.dev10
    wasabi2d 1.3.0 depends on pygame==2.0.0.dev6
    wasabi2d 1.2.0 depends on pygame==2.0.0.dev3
    wasabi2d 1.1.0 depends on pygame==2.0.0.dev3
    wasabi2d 1.0.0 depends on pygame==2.0.0.dev3

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

@BitPigeon
Copy link

According to the requirements.txt, versions 2.0.0, 2.0.1, 2.0.2, 2.0.3 should work. But it makes it seem like it need 2.0.0?

@dcbb
Copy link
Author

dcbb commented Mar 8, 2023

When I download wasabi2d-1.4.0.tar.gz from Pypy and unzip it, the requirements.txt contains the following line:

pygame==2.0.0.dev10

Might that be the issue?

I'm not sure what it looks like in the wheel file, but I'll try to unpack it (haven't done that before).

@dcbb
Copy link
Author

dcbb commented Mar 8, 2023

I upacked the wheel file from the same Pypy page, and I see the following line in the file wasabi2d-1.4.0.dist-info/METADATA:

Requires-Dist: pygame (==2.0.0.dev10)

I'm not a pip or wheel expert by any means, but that looks troublesome to me.

@dcbb
Copy link
Author

dcbb commented Mar 8, 2023

Ok, to me it looks like the wheel file which pip install wasabi2d downloads contains requirements which cannot be satisfied, at least not if your are trying to install on an M1 (arm) Mac.

I was finally able to install Wasabi2d by doing the following:

  • download the wheel here
  • wheel unpack the file
  • change the in the following lines in info/METADATA (showing my new lines here):
    • Requires-Dist: pygame (>=2.0.0) (originally: pygame (==2.0.0.dev10))
    • Requires-Dist: mapbox-earcut (>=0.12.10) (this one crashed on install due missing cmake, i.e. it did not find a precompiled version 0.12.10 for my system, presumably because I'm on an M1 Macbook)
  • wheel pack everything back together
  • pip install the repacked wheel

With this procedure I was able to install Wasabi and run a basic example from the docs with Python 3.8.10. But I have no idea whether something will break down the road due to a newer version of pygame or mapbox-earcut I have now installed.

Specifically, my versions are, according to pip info:
mapbox-earcut 1.0.1
pygame 2.2.0

It would be great if the package maintainer could update the wheel. I'm surprised that it seems to work for other people with the dependency versions that are specified.

Please let me know whether I should open a new issue for that.

@BitPigeon
Copy link

Yeah, you should probably open a new issue for that, and assign one of the owners of this repository to it.

@dcbb
Copy link
Author

dcbb commented Mar 9, 2023

Unfortunately, when playing around with Wasabi just a bit, I encountered crashes in really basic functions, such as drawing text. Presumably that's due to my "fix", using too recent versions of other libraries. Or nobody else has ever tried Wasabi on a Mac.

While I'm still fascinated by Wasabi's co-routine approach to game programming, I don't have the time to work out all the fixes I will likely need to really use it.

@Alan3344
Copy link

Alan3344 commented Sep 3, 2023

I used the Win11 platform SandBox to test, and specifically downloaded Python 3.8.0, but it could not be installed. The following is a screenshot.
cmd: pip install wasabi2d
image

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

3 participants