我用setup.py在虚拟环境中完成了自定义库的安装,我遇到一个错误,如何访问外部工具:'/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'
这是我的设置.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
""",
)
包装和安装成功
python setup.py bdist_egg
python setup.py install
是否有访问外部文件的方法
'/mac是一个文件夹,而不是一个文件,它会导致这样的错误。