python-client icon indicating copy to clipboard operation
python-client copied to clipboard

Appium-Python-Client fails to build when installing to Python 3.12.9

Open kurtke1990 opened this issue 9 months ago • 3 comments

I've encountered the build issue when installing Appium-Python-Client without cache to Python 3.12.9 (This is seen on 3.12.8 as well.)

How to reproduce?

  1. Install Python 3.12.9.
  2. pip install Appium-Python-Client --no-cache-dir to install.

Waiting for a while, it shows the error as below: Image

For now, I downgraded python version to 3.12.3 as a workaround.

kurtke1990 avatar Mar 21 '25 06:03 kurtke1990

@kurtke1990 It works perfectly fine for me with python 3.12.9:

➜  python --version
Python 3.12.9
➜  pip install Appium-Python-Client --no-cache-dir
Collecting Appium-Python-Client
  Downloading appium_python_client-4.5.1.tar.gz (126 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: selenium<5.0,~=4.26 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from Appium-Python-Client) (4.29.0)
Requirement already satisfied: urllib3<3,>=1.26 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from urllib3[socks]<3,>=1.26->selenium<5.0,~=4.26->Appium-Python-Client) (2.3.0)
Requirement already satisfied: trio~=0.17 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from selenium<5.0,~=4.26->Appium-Python-Client) (0.29.0)
Requirement already satisfied: trio-websocket~=0.9 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from selenium<5.0,~=4.26->Appium-Python-Client) (0.12.2)
Requirement already satisfied: certifi>=2021.10.8 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from selenium<5.0,~=4.26->Appium-Python-Client) (2025.1.31)
Requirement already satisfied: typing_extensions~=4.9 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from selenium<5.0,~=4.26->Appium-Python-Client) (4.12.2)
Requirement already satisfied: websocket-client~=1.8 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from selenium<5.0,~=4.26->Appium-Python-Client) (1.8.0)
Requirement already satisfied: attrs>=23.2.0 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from trio~=0.17->selenium<5.0,~=4.26->Appium-Python-Client) (25.1.0)
Requirement already satisfied: sortedcontainers in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from trio~=0.17->selenium<5.0,~=4.26->Appium-Python-Client) (2.4.0)
Requirement already satisfied: idna in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from trio~=0.17->selenium<5.0,~=4.26->Appium-Python-Client) (3.10)
Requirement already satisfied: outcome in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from trio~=0.17->selenium<5.0,~=4.26->Appium-Python-Client) (1.3.0.post0)
Requirement already satisfied: sniffio>=1.3.0 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from trio~=0.17->selenium<5.0,~=4.26->Appium-Python-Client) (1.3.1)
Requirement already satisfied: wsproto>=0.14 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from trio-websocket~=0.9->selenium<5.0,~=4.26->Appium-Python-Client) (1.2.0)
Requirement already satisfied: pysocks!=1.5.7,<2.0,>=1.5.6 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from urllib3[socks]<3,>=1.26->selenium<5.0,~=4.26->Appium-Python-Client) (1.7.1)
Requirement already satisfied: h11<1,>=0.9.0 in /Users/navinchandra/miniconda3/envs/globe/lib/python3.12/site-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium<5.0,~=4.26->Appium-Python-Client) (0.14.0)
Building wheels for collected packages: Appium-Python-Client
  Building wheel for Appium-Python-Client (setup.py) ... done
  Created wheel for Appium-Python-Client: filename=Appium_Python_Client-4.5.1-py3-none-any.whl size=344797 sha256=749d2108f8b1296f895c2cf7085129516616fbef38ac6d40441154b316d2622d
  Stored in directory: /private/var/folders/wn/xcd3cp5546z2c5r67qqwf8140000gr/T/pip-ephem-wheel-cache-cm1yoeca/wheels/6b/4f/b8/9052e2cf6614149ff935d281c42451a872065aee23349d347b
Successfully built Appium-Python-Client
Installing collected packages: Appium-Python-Client
Successfully installed Appium-Python-Client-4.5.1

You can try these fixes if you still are getting it -

  1. https://stackoverflow.com/questions/72294299/multiple-top-level-packages-discovered-in-a-flat-layout

navin772 avatar Mar 21 '25 10:03 navin772

Weird. This issue is seen only on my Windows laptop. However, It works perfectly on Mac.

kurtke1990 avatar Mar 21 '25 13:03 kurtke1990

Hmm, I am also on Mac, I will try on a Windows device.

navin772 avatar Mar 21 '25 13:03 navin772

I think I found the root cause. The setuptools was locked to an old version so the appium-python-client couldn't be built. Thank you @navin772

kurtke1990 avatar May 31 '25 06:05 kurtke1990