设备场中的解析失败

时间:2018-03-27 04:26:47

标签: python appium python-appium aws-device-farm

我正在尝试使用Appium Python将测试脚本分析设备性能上传到Device Farm,但是在运行测试时遇到了很大的麻烦。我主要是在加载轮子时遇到错误,因为Device Farm只接受linux_x86_64和-none-all结尾。我将测试脚本打包在Ubuntu虚拟机上,因此所有下载的轮子都应该是正确的格式。但是,许多轮子,比如numpy,需要-manylinux1_x86_64,而不是linux_x86_64。设备农场仍然可以接受这个吗?除非我将所有非万向轮重命名为最后都有一个“-none-all.whl”,否则它甚至不会过去导入测试脚本。但是,即使我这样做,它也会在下面的输出中抛出一个解析错误。

对于可能导致此错误的任何想法都会非常感激!

解析错误:

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/scratchCdQ6f1.scratch/tmpI_jJ54/bin/pip install --use-wheel --no-index --find-links /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/wheelhouse --requirement /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt' failed.

Ignoring indexes: https://pypi.python.org/simple
Collecting Appium-Python-Client==0.26 (from -r    /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 1))
Collecting attrs==17.4.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 2))
Collecting funcsigs==1.0.2 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 3))
Collecting linecache2==1.0.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 4))
Collecting more-itertools==4.1.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 5))
Collecting mpmath==1.0.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 6))
Collecting numpy==1.14.2 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 7))
  Could not find a version that satisfies the requirement numpy==1.14.2 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 7)) (from versions: )
No matching distribution found for numpy==1.14.2 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 7))

Tried to install test dependency wheels by downloading the dependencies packages from the internet, but failed. See the information below for more details.

'/tmp/scratchCdQ6f1.scratch/tmpI_jJ54/bin/pip install --use-wheel --requirement /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt' failed.

Collecting Appium-Python-Client==0.26 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 1))
/tmp/scratchCdQ6f1.scratch/tmpI_jJ54/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading Appium-Python-Client-0.26.tar.gz
Collecting attrs==17.4.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 2))
  Downloading attrs-17.4.0-py2.py3-none-any.whl
Collecting funcsigs==1.0.2 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 3))
  Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Collecting linecache2==1.0.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 4))
  Downloading linecache2-1.0.0-py2.py3-none-any.whl
Collecting more-itertools==4.1.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 5))
  Downloading more_itertools-4.1.0-py2-none-any.whl (47kB)
Collecting mpmath==1.0.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 6))
  Downloading mpmath-1.0.0.tar.gz (511kB)
Collecting numpy==1.14.2 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 7))
  Downloading numpy-1.14.2.zip (4.9MB)
Collecting pandas==0.22.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 8))
  Downloading pandas-0.22.0.tar.gz (11.3MB)
Collecting parameterized==0.6.1 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 9))
  Downloading parameterized-0.6.1-py2.py3-none-any.whl
Collecting patsy==0.5.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 10))
  Downloading patsy-0.5.0-py2.py3-none-any.whl (232kB)
Collecting pluggy==0.6.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 11))
  Downloading pluggy-0.6.0.tar.gz
Collecting psutil==5.4.3 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 12))
  Downloading psutil-5.4.3.tar.gz (412kB)
Collecting py==1.5.3 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 13))
  Downloading py-1.5.3-py2.py3-none-any.whl (84kB)
Collecting pytest==3.5.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 14))
  Downloading pytest-3.5.0-py2.py3-none-any.whl (194kB)
Collecting python-dateutil==2.7.2 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 15))
  Downloading python_dateutil-2.7.2-py2.py3-none-any.whl (212kB)
Collecting pytz==2018.3 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 16))
  Downloading pytz-2018.3-py2.py3-none-any.whl (509kB)
Collecting scikit-learn==0.19.1 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 17))
  Downloading scikit-learn-0.19.1.tar.gz (9.5MB)
Collecting scipy==1.0.1 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 18))
  Downloading scipy-1.0.1.tar.gz (15.5MB)
Collecting selenium==3.11.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 19))
  Downloading selenium-3.11.0-py2.py3-none-any.whl (943kB)
Collecting six==1.11.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 20))
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting sklearn==0.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 21))
  Downloading sklearn-0.0.tar.gz
Collecting statsmodels==0.8.0 (from -r /tmp/scratchCdQ6f1.scratch/test-packageV9qjSS/requirements.txt (line 22))
  Downloading statsmodels-0.8.0.tar.gz (9.5MB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-r5nGyL/statsmodels/setup.py", line 335, in <module>
        from numpy.distutils.misc_util import get_info
    ImportError: No module named numpy.distutils.misc_util

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-r5nGyL/statsmodels
/tmp/scratchCdQ6f1.scratch/tmpI_jJ54/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90:    InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
You are using pip version 7.1.2, however version 9.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

包装代码

cd Desktop/
virtualenv workspace
cd workspace
source bin/activate
pip install pytest
mkdir tests/
mkdir test_data/
cd test_data/
cp -a /home/jacob/Desktop/test_data_bundle2/ .
cd ..
cd tests/
cp /home/jacob/Desktop/test_wordcount.py .
cd ..
cd lib/python2.7/site-packages/
pip install unittest2
pip install Appium-Python-Client
pip install parameterized
pip install numpy
pip install sklearn
pip install psutil
pip install statsmodels
pip install mpmath
cd ../../..
py.test  --collect-only tests/
pip freeze > requirements.txt
pip wheel --wheel-dir wheelhouse -r requirements.txt
find . -name '__pycache__' -type d -exec rm -r {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
cd wheelhouse/
mv numpy-1.14.2-cp27-cp27mu-manylinux1_x86_64.whl numpy-1.14.2-cp27-cp27mu-none-any.whl
mv pandas-0.22.0-cp27-cp27mu-manylinux1_x86_64.whl pandas-0.22.0-cp27-cp27mu-none-any.whl
mv scikit_learn-0.19.1-cp27-cp27mu-manylinux1_x86_64.whl scikit_learn-0.19.1-cp27-cp27mu-none-any.whl
mv scipy-1.0.1-cp27-cp27mu-manylinux1_x86_64.whl scipy-1.0.1-cp27-cp27mu-none-any.whl
mv statsmodels-0.8.0-cp27-cp27mu-manylinux1_x86_64.whl statsmodels-0.8.0-cp27-cp27mu-none-any.whl
cd ..
zip -r test_bundle_v2_5.zip tests/ wheelhouse/ test_data/ requirements.txt

更新#1:

requirements.txt的内容

Appium-Python-Client==0.26
attrs==17.4.0
funcsigs==1.0.2
linecache2==1.0.0
more-itertools==4.1.0
mpmath==1.0.0
numpy==1.14.2
pandas==0.22.0
parameterized==0.6.1
patsy==0.5.0
pluggy==0.6.0
psutil==5.4.3
py==1.5.3
pytest==3.5.0
python-dateutil==2.7.2
pytz==2018.3
scikit-learn==0.19.1
scipy==1.0.1
selenium==3.11.0
six==1.11.0
sklearn==0.0
statsmodels==0.8.0
traceback2==1.4.0
unittest2==1.1.0

驾驶室文件夹的内容: Screenshot of wheelhouse folder

0 个答案:

没有答案