Python macOS上的frappe bench安装错误

Python macOS上的frappe bench安装错误,python,erpnext,frappe,Python,Erpnext,Frappe,我是新的frappe bench,ERPEXT,我正试图按照 这些是我在运行命令时遇到的错误 bench init frappe bench和cd frappe bench wasifs-MacBook-Air-3:sites wasifkhalil$ bench init frappe-bench && cd frappe-bench Already using interpreter /Library/Frameworks/Python.framework/Versions/

我是新的
frappe bench
ERPEXT
,我正试图按照

这些是我在运行命令时遇到的错误

bench init frappe bench和cd frappe bench

wasifs-MacBook-Air-3:sites wasifkhalil$ bench init frappe-bench && cd frappe-bench
Already using interpreter /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
INFO:bench.app:getting app frappe
Cloning into 'frappe'...
remote: Counting objects: 2019, done.
remote: Compressing objects: 100% (1864/1864), done.
remote: Total 2019 (delta 276), reused 832 (delta 100), pack-reused 0
Receiving objects: 100% (2019/2019), 12.66 MiB | 1.37 MiB/s, done.
Resolving deltas: 100% (276/276), done.
installing frappe
INFO:bench.app:installing frappe
Command "/Users/wasifkhalil/sites/frappe-bench/env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/9j/mk4mk3qj33zd0ys_6hsw9l6h0000gn/T/pip-build-smwpqq/mysql-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/9j/mk4mk3qj33zd0ys_6hsw9l6h0000gn/T/pip-InRsiA-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/wasifkhalil/sites/frappe-bench/env/bin/../include/site/python2.7/mysql-python" failed with error code 1 in /private/var/folders/9j/mk4mk3qj33zd0ys_6hsw9l6h0000gn/T/pip-build-smwpqq/mysql-python/
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/Users/wasifkhalil/sites/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/wasifkhalil/sites/bench-repo/bench/commands/make.py", line 19, in init
    verbose=verbose, clone_from=clone_from)
  File "/Users/wasifkhalil/sites/bench-repo/bench/utils.py", line 56, in init
    get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)
  File "/Users/wasifkhalil/sites/bench-repo/bench/app.py", line 73, in get_app
    install_app(app=app_name, bench_path=bench_path, verbose=verbose)
  File "/Users/wasifkhalil/sites/bench-repo/bench/app.py", line 103, in install_app
    find_links=find_links))
  File "/Users/wasifkhalil/sites/bench-repo/bench/utils.py", line 127, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: frappe-bench/env/bin/pip install -q  -e frappe-bench/apps/frappe
wasifs-MacBook-Air-3:网站wasifkhalil$bench init frappe bench和cd frappe bench
已经在使用解释器/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
信息:工作台。应用程序:获取应用程序frappe
克隆成“frappe”。。。
远程:计数对象:2019,完成。
远程:压缩对象:100%(1864/1864),完成。
远程:总计2019个(增量276个),重复使用832个(增量100个),包重复使用0个
接收对象:100%(2019/2019),12.66 MiB | 1.37 MiB/s,完成。
解析三角洲:100%(276/276),完成。
安装frappe
信息:工作台。应用程序:安装frappe
命令“/Users/wasifkhalil/sites/frappe bench/env/bin/python-u-c”导入setuptools,标记化__文件“/private/var/folders/9j/mk4mk3qj33zd0ys_6hsw9l6h0000gn/T/pip build smwpqq/mysql python/setup.py”;f=getattr(标记化“打开”,打开)(_文件);code=f.read().replace('\r\n','\n');f、 close();exec(compile(code,file,exec'))“安装--record/var/folders/9j/mk4mk3qj33zd0ys\u 6hsw9l6h0000gn/T/pip InRsiA record/install-record.txt--外部管理的单一版本--编译--install headers/Users/wasifkhalil/sites/frappe bench/env/bin/。/include/site/python2.7/mysql python”失败,在/private/var/folders/9j/mk4mk3qj33zd0ys_6hsw9l6h0000gn/T/pip build smwpqq/mysql python中出现错误代码1/
回溯(最近一次呼叫最后一次):
文件“/Library/Frameworks/Python.framework/Versions/2.7/bin/bench”,第11行,在
加载入口点(“工作台”、“控制台脚本”、“工作台”)()
文件“/Users/wasifkhalil/sites/bench repo/bench/cli.py”,cli第40行
bench_命令()
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site packages/click/core.py”,第722行,在调用中__
返回self.main(*args,**kwargs)
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/click/core.py”,第697行,在main中
rv=自调用(ctx)
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site packages/click/core.py”,调用中的第1066行
返回进程结果(sub_ctx.command.invoke(sub_ctx))
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site packages/click/core.py”,调用中第895行
返回ctx.invoke(self.callback,**ctx.params)
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site packages/click/core.py”,调用中第535行
返回回调(*args,**kwargs)
文件“/Users/wasifkhalil/sites/bench repo/bench/commands/make.py”,第19行,在init中
verbose=verbose,clone\u from=clone\u from)
文件“/Users/wasifkhalil/sites/bench repo/bench/utils.py”,第56行,在init中
获取应用程序(frappe\u路径,分支=frappe\u分支,工作台\u路径=路径,构建\u资产\u文件=False,详细=详细)
文件“/Users/wasifkhalil/sites/bench repo/bench/app.py”,第73行,在get_应用程序中
安装应用程序(app=app\u name,bench\u path=bench\u path,verbose=verbose)
文件“/Users/wasifkhalil/sites/bench repo/bench/app.py”,第103行,安装应用程序
查找链接=查找链接)
文件“/Users/wasifkhalil/sites/bench repo/bench/utils.py”,第127行,在exec_cmd中
raise命令失败错误(cmd)
bench.utils.CommandFailedError:frappe bench/env/bin/pip安装-q-e frappe bench/apps/frappe
我最近安装了
python
,因此必须安装和更新
setuptools
,但是如果
setuptools
出现问题,我应该如何检查和更新,如果没有问题,我应该如何修复

为了便于理解,我还发布了一个截图


问题出现在mysql和mode.js中,您可能早就解决了这个问题,可能是因为您正在使用新版本的frappe

不过,这个答案可能对一些新人有所帮助

1。安装先决条件

mkdir projectdir
cd projectdir
virtualenv .
git clone https://github.com/frappe/bench bench-repo
sudo pip install -e bench-repo
bench init frappe-bench && cd frappe-bench
bench get-app erpnext https://github.com/frappe/erpnext
bench new-site site1.local
bench --site site1.local install-app erpnext
bench start
  • Python 2.7
  • 马里亚布10+
  • Nginx(用于生产)
  • Nodejs
  • 雷迪斯
  • 带修补Qt的wkhtmltopdf(用于生成pdf)
2.安装步骤

mkdir projectdir
cd projectdir
virtualenv .
git clone https://github.com/frappe/bench bench-repo
sudo pip install -e bench-repo
bench init frappe-bench && cd frappe-bench
bench get-app erpnext https://github.com/frappe/erpnext
bench new-site site1.local
bench --site site1.local install-app erpnext
bench start

有关更多信息

您可以添加安装所用的全部步骤吗?您是否使用了easy install ansible脚本?我遵循了这里的步骤,并坚持基本用法,在这一行中创建一个新的benchlooking“失败,错误代码为1 in/private/tmp/pip-build-zS3Gci/mysql-python/\”我猜这与mysql pythonDid有关,您是手动安装还是轻松安装?我尝试了手动安装和轻松安装,轻松安装也出现了相同的错误“失败,错误代码为/private/tmp/pip-build-zS3Gci/mysql python/\n”