AWS Device Farm fails to install the required packages when executed from a Test stage in CodePipeline
Hi,
I successfully create and execute a test run on the Device Farm that was defined using the Device Farm console, but when I try to run the same test configuration as a Test stage in CodePipeline it fails installing the required packages.
Please find below the requirements.txt, the Test spec output of a successful test run (configured via the device farm console) and the parsing result file of the failed execution. I used exactly the same test_bundle.zip in both cases.
Thanks:)
requirements.txt -
Appium-Python-Client==2.7.1 py==1.10.0 pytest==7.2.0 selenium==4.7.2
parsing result file (of the failed execution from CodePipeline) -
Tried to install test dependency wheels by using the dependencies packages in the 'wheelhouse' directory, but failed. There are missing wheel dependencies in the 'wheelhouse' directory. Please make sure 'wheelhouse' directory has all the dependencies specified in 'requirements.txt' file. See the information below for more details. '/tmp/scratchWdZxe1.scratch/tmpd1xH4C/bin/pip install --no-index --find-links /tmp/scratchWdZxe1.scratch/test-packagezcLTko/wheelhouse --requirement /tmp/scratchWdZxe1.scratch/test-packagezcLTko/requirements.txt' failed. DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Looking in links: /tmp/scratchWdZxe1.scratch/test-packagezcLTko/wheelhouse WARNING: Url '/tmp/scratchWdZxe1.scratch/test-packagezcLTko/wheelhouse' is ignored. It is either a non-existing path or lacks a specific scheme. ERROR: Could not find a version that satisfies the requirement Appium-Python-Client==2.7.1 (from -r /tmp/scratchWdZxe1.scratch/test-packagezcLTko/requirements.txt (line 1)) (from versions: none) ERROR: No matching distribution found for Appium-Python-Client==2.7.1 (from -r /tmp/scratchWdZxe1.scratch/test-packagezcLTko/requirements.txt (line 1)) Tried to install test dependency wheels by downloading the dependencies packages from the internet, but failed. See the information below for more details. '/tmp/scratchWdZxe1.scratch/tmpd1xH4C/bin/pip install --requirement /tmp/scratchWdZxe1.scratch/test-packagezcLTko/requirements.txt' failed. DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Collecting Appium-Python-Client==2.7.1 Downloading Appium-Python-Client-2.7.1.tar.gz (3.4 MB)
ERROR: Command errored out with exit status 1:
command: /tmp/scratchWdZxe1.scratch/tmpd1xH4C/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-AOVHEH/appium-python-client/setup.py'"'"'; __file__='"'"'/tmp/pip-install-AOVHEH/appium-python-client/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-noiB8m
cwd: /tmp/pip-install-AOVHEH/appium-python-client/
Complete output (8 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-AOVHEH/appium-python-client/setup.py", line 19, in <module>
from appium.common.helper import library_version
File "appium/common/helper.py", line 20
def extract_const_attributes(cls: type) -> Dict[str, Any]:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Test spec output (of a successful execution form the Device Farm console) -
NOTE: when creating the test run I chose to use AWS custom Test environment (with the default TestSpec for Android Appium Python v4.0)
[DEVICEFARM] ########### Entering phase install ###########
[DeviceFarm] export PYTHON_VERSION=3
[DeviceFarm] cd $DEVICEFARM_TEST_PACKAGE_PATH
[DeviceFarm] . bin/activate
[DeviceFarm] pip install -r requirements.txt
Collecting Appium-Python-Client==2.7.1 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/a2/25/5c7ea73493fb60accc17dd680e9b91ccc35db3725c09dbdde0251955696b/Appium-Python-Client-2.7.1.tar.gz (3.4MB)
Collecting py==1.10.0 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/67/32/6fe01cfc3d1a27c92fdbcdfc3f67856da8cbadf0dd9f2e18055202b2dc62/py-1.10.0-py2.py3-none-any.whl (97kB)
Collecting pytest==7.2.0 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/67/68/a5eb36c3a8540594b6035e6cdae40c1ef1b6a2bfacbecc3d1a544583c078/pytest-7.2.0-py3-none-any.whl (316kB)
Collecting selenium==4.7.2 (from -r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/00/7b/d511219e116fd4d18b0dd6e32fb5ec7a0a169165f8132111a7422d5952f5/selenium-4.7.2-py3-none-any.whl (6.3MB)
Collecting attrs>=19.2.0 (from pytest==7.2.0->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/fb/6e/6f83bf616d2becdf333a1640f1d463fef3150e2e926b7010cb0f81c95e88/attrs-22.2.0-py3-none-any.whl (60kB)
Collecting tomli>=1.0.0; python_version < "3.11" (from pytest==7.2.0->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl
Collecting exceptiongroup>=1.0.0rc8; python_version < "3.11" (from pytest==7.2.0->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/e8/14/9c6a7e5f12294ccd6975a45e02899ed25468cd7c2c86f3d9725f387f9f5f/exceptiongroup-1.1.0-py3-none-any.whl
Collecting pluggy<2.0,>=0.12 (from pytest==7.2.0->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/9e/01/f38e2ff29715251cf25532b9082a1589ab7e4f571ced434f98d0139336dc/pluggy-1.0.0-py2.py3-none-any.whl
Collecting packaging (from pytest==7.2.0->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/8f/7b/42582927d281d7cb035609cd3a543ffac89b74f3f4ee8e1c50914bcb57eb/packaging-22.0-py3-none-any.whl (42kB)
Collecting importlib-metadata>=0.12; python_version < "3.8" (from pytest==7.2.0->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/26/a7/9da7d5b23fc98ab3d424ac2c65613d63c1f401efb84ad50f2fa27b2caab4/importlib_metadata-6.0.0-py3-none-any.whl
Collecting iniconfig (from pytest==7.2.0->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl
Collecting certifi>=2021.10.8 (from selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/71/4c/3db2b8021bd6f2f0ceb0e088d6b2d49147671f25832fb17970e9b583d742/certifi-2022.12.7-py3-none-any.whl (155kB)
Collecting urllib3[socks]=1.26 (from selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/65/0c/cc6644eaa594585e5875f46f3c83ee8762b647b51fc5b0fb253a242df2dc/urllib3-1.26.13-py2.py3-none-any.whl (140kB)
Collecting trio-websocket=0.9 (from selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/db/c5/b5e8bc1f40568a354f2a9cc296b8892605a9d2f22e725290fc33836dd2a3/trio_websocket-0.9.2-py3-none-any.whl
Collecting trio~=0.17 (from selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/f1/ed/3623a910f9bb7a31b067d6baef476ed6e294e92a245f94ab992988e4a666/trio-0.22.0-py3-none-any.whl (384kB)
Collecting zipp>=0.5 (from importlib-metadata>=0.12; python_version < "3.8"->pytest==7.2.0->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/d8/20/256eb3f3f437c575fb1a2efdce5e801a5ce3162ea8117da96c43e6ee97d8/zipp-3.11.0-py3-none-any.whl
Collecting typing-extensions>=3.6.4; python_version < "3.8" (from importlib-metadata>=0.12; python_version < "3.8"->pytest==7.2.0->-r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/0b/8e/f1a0a5a76cfef77e1eb6004cb49e5f8d72634da638420b9ea492ce8305e8/typing_extensions-4.4.0-py3-none-any.whl
Collecting PySocks!=1.5.7,<2.0,>=1.5.6; extra == "socks" (from urllib3[socks]=1.26->selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/8d/59/b4572118e098ac8e46e399a1dd0f2d85403ce8bbaad9ec79373ed6badaf9/PySocks-1.7.1-py3-none-any.whl
Collecting async-generator>=1.10 (from trio-websocket=0.9->selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/71/52/39d20e03abd0ac9159c162ec24b93fbcaa111e8400308f2465432495ca2b/async_generator-1.10-py3-none-any.whl
Collecting wsproto>=0.14 (from trio-websocket~=0.9->selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/78/58/e860788190eba3bcce367f74d29c4675466ce8dddfba85f7827588416f01/wsproto-1.2.0-py3-none-any.whl
Collecting sortedcontainers (from trio~=0.17->selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl
Collecting outcome (from trio~=0.17->selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/e9/4f/2f2d3f65d851852712b4de3fd0cfdcec9c5e9a9c347430e004ba770ef4db/outcome-1.2.0-py2.py3-none-any.whl
Collecting sniffio (from trio~=0.17->selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/c3/a0/5dba8ed157b0136607c7f2151db695885606968d1fae123dc3391e0cfdbf/sniffio-1.3.0-py3-none-any.whl
Collecting idna (from trio~=0.17->selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl (61kB)
Collecting h11<1,>=0.9.0 (from wsproto>=0.14->trio-websocket~=0.9->selenium==4.7.2->-r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/95/04/ff642e65ad6b90db43e668d70ffb6736436c7ce41fcc549f4e9472234127/h11-0.14.0-py3-none-any.whl (58kB)
Installing collected packages: certifi, PySocks, urllib3, async-generator, typing-extensions, h11, wsproto, attrs, exceptiongroup, sortedcontainers, outcome, sniffio, idna, trio, trio-websocket, selenium, Appium-Python-Client, py, tomli, zipp, importlib-metadata, pluggy, packaging, iniconfig, pytest
Running setup.py install for Appium-Python-Client: started
Running setup.py install for Appium-Python-Client: finished with status 'done'
Successfully installed Appium-Python-Client-2.7.1 PySocks-1.7.1 async-generator-1.10 attrs-22.2.0 certifi-2022.12.7 exceptiongroup-1.1.0 h11-0.14.0 idna-3.4 importlib-metadata-6.0.0 iniconfig-2.0.0 outcome-1.2.0 packaging-22.0 pluggy-1.0.0 py-1.10.0 pytest-7.2.0 selenium-4.7.2 sniffio-1.3.0 sortedcontainers-2.4.0 tomli-2.0.1 trio-0.22.0 trio-websocket-0.9.2 typing-extensions-4.4.0 urllib3-1.26.13 wsproto-1.2.0 zipp-3.11.0
You are using pip version 19.0.3, however version 22.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[DeviceFarm] export NVM_DIR=$HOME/.nvm
[DeviceFarm] . $NVM_DIR/nvm.sh
[DeviceFarm] nvm install 14.19.1
v14.19.1 is already installed.
Now using node v14.19.1 (npm v6.14.16)
[DeviceFarm] export APPIUM_VERSION=1.22.2
[DeviceFarm] avm $APPIUM_VERSION
/usr/bin/avm: line 261: appium: command not found
[36m exists[0m : [90m[0m
[DeviceFarm] ln -s /usr/local/avm/versions/$APPIUM_VERSION/node_modules/.bin/appium /usr/local/avm/versions/$APPIUM_VERSION/node_modules/appium/bin/appium.js
[DEVICEFARM] ########### Entering phase pre_test ###########
- Newest
- Most votes
- Most comments
Relevant content
- asked 2 years agolg...
- asked 2 years agolg...
- asked 2 years agolg...
- Accepted Answerasked 2 years agolg...
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago