+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

How to access external files in a custom library with virtual environment? [closed]

发布于2021-03-06 19:06     阅读(442)     评论(0)     点赞(12)     收藏(3)


0

1

2

3

4

5

6

7

I finished installing the custom library in the virtual environment with setup.py, I got an error,How to access external tools: '/Users/xmly/PycharmProjects/aiautotest/airtest/core/android/static/adb/mac/adb'

File "/Users/xmly/venv/aiautotest/lib/python3.7/site-packages/aiautotest-1.0-py3.7.egg/airtest/core/android/adb.py", line 189, in cmd
    proc = self.start_cmd(cmds, device)
  File "/Users/xmly/venv/aiautotest/lib/python3.7/site-packages/aiautotest-1.0-py3.7.egg/airtest/core/android/adb.py", line 168, in start_cmd
    stderr=subprocess.PIPE
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/Users/xmly/PycharmProjects/aiautotest/airtest/core/android/static/adb/mac'

this is my setup.py:

from setuptools import find_packages, setup
setup(
    name='aiautotest',
    version='1.0',
    packages=find_packages(),
    package_data={
        'aiautotest': ["config/*"],
        'airtest': ["report/*", "core/android/static/*"]
    },
    entry_points="""
    [console_scripts]
    aiautotest = aiautotest.__main__:main
    """,
)

Packaging and installation are successful

python setup.py bdist_egg
python setup.py install

Is there a way to access external files?


解决方案


’./mac' is a folder, not a file, which causes such an error.

0

1

2

3

4

5

6

7

8



所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接: https://www.pythonheidong.com/blog/article/879595/72a9b3842b6f29615d6d/

来源: python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

12 0
收藏该文
已收藏

评论内容:(最多支持255个字符)