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

[BUG] Can't install Playwright with Conda on M1 Mac #1745

Closed
mburki32 opened this issue Jan 30, 2023 · 12 comments · Fixed by #2211
Closed

[BUG] Can't install Playwright with Conda on M1 Mac #1745

mburki32 opened this issue Jan 30, 2023 · 12 comments · Fixed by #2211

Comments

@mburki32
Copy link

Context:

  • Playwright Version: v1.30
  • Operating System: MacOS Ventura 13.1
  • Python version: 3.9
  • Extra: conda 22.11.1

Code Snippet

% conda create -n test_playwright python=3.9

% conda activate test_playwright

% conda install -c microsoft playwright
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: - 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions
@mxschmitt
Copy link
Member

mxschmitt commented Jan 31, 2023

Looks like it found conflicts but it's not able to list them. I'm not a conda expert, so would appreciate if you could dig a bit - maybe some log files somewhere will give us more hints or enabling a verbose mode.

Let me try on my macOS in a bit.

@mxschmitt
Copy link
Member

I tried it on my M1 mac with miniconda Intel where it was working without any issues. If you have miniconda for Apple M1 Silicon Chip, then its indeed not working.

@mburki32
Copy link
Author

mburki32 commented Jan 31, 2023

I tried it on my M1 mac with miniconda Intel where it was working without any issues. If you have miniconda for Apple M1 Silicon Chip, then its indeed not working.

I do have an Apple M1 pro Silicon Chip...

what are the workarounds for this (if any)?

@mxschmitt
Copy link
Member

You can install miniconda Intel instead as a workaround. Maybe you can also override the arch which conda is installing.

@mxschmitt mxschmitt changed the title [BUG] can't install playwright on MacOS Ventura 13.1 [BUG] Can't install Playwright with Conda on M1 Mac Jan 31, 2023
@mburki32
Copy link
Author

is direct support for M1 Silicon Chip in the works? when will it be available?

In the meantime I will try what @mxschmitt suggested. I found the following 2 resources that might help me with the workaround:

@mburki32
Copy link
Author

mburki32 commented Feb 1, 2023

I have tried to install playwright with miniconda intel based on the above instructions and tried to install playwright but am still getting the same error:

(playwright_39_x86) ~ % uname -m
x86_64
(playwright_39_x86) ~ % conda list
# packages in environment at /Users/mburki/miniconda3-intel/envs/playwright_39_x86:
#
# Name                    Version                   Build  Channel
ca-certificates           2023.01.10           hecd8cb5_0  
certifi                   2022.12.7        py39hecd8cb5_0  
libcxx                    14.0.6               h9765a3e_0  
libffi                    3.4.2                hecd8cb5_6  
ncurses                   6.4                  hcec6c5f_0  
openssl                   1.1.1s               hca72f7f_0  
pip                       22.3.1           py39hecd8cb5_0  
python                    3.9.16               h218abb5_0  
readline                  8.2                  hca72f7f_0  
setuptools                65.6.3           py39hecd8cb5_0  
sqlite                    3.40.1               h880c91c_0  
tk                        8.6.12               h5d9f67b_0  
tzdata                    2022g                h04d1e81_0  
wheel                     0.37.1             pyhd3eb1b0_0  
xz                        5.2.10               h6c40b1e_1  
zlib                      1.2.13               h4dc903c_0  
(playwright_39_x86) ~ % conda install -c microsoft playwright
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                          

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

What am I missing?

@mxschmitt
Copy link
Member

mxschmitt commented Feb 1, 2023

Since not a lot of people are using conda with Playwright, and from my research an Apple Silicon Mac is required to publish to conda when you want to provide M1 conda builds, it most likely does not happen in the near future. We recommend using PIP for now, which has Apple Silicon support with Playwright.

The error unfortunately does not say much what's going wrong.

@gvogler
Copy link

gvogler commented May 19, 2023

On Apple Silicon it seems there is a conflict with the greenlet version requirements. Playwright requires greenlet==2.0.1, but I can only install greenlet v.2.0.2 using pip. Installation from git installs correctly.

@ernests
Copy link

ernests commented Jul 31, 2023

Installed 1.36 with pip and there was no conflict with greenlet==2.02.

Successfully installed greenlet-2.0.2 playwright-1.36.0

pip installs arm64 version - Downloading playwright-1.36.0-py3-none-macosx_11_0_arm64.whl. Said that, conda support would be nice.

@Artkoch
Copy link

Artkoch commented Sep 3, 2023

I've installed playwright into base env, but on playwright launch script is just stops with no error log

@pavelzw
Copy link

pavelzw commented Sep 3, 2023

from my research an Apple Silicon Mac is required to publish to conda when you want to provide M1 conda builds

This is not correct. You can specify the target platform in conda-build and create cross-platform builds. Conda-forge is actually doing exactly this for all their M1 packages.

@mxschmitt
Copy link
Member

This should be fixed as part of v1.43.0

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

Successfully merging a pull request may close this issue.

6 participants