Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/345.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
试图在Mac上安装带有Python3的MetaTrader5_Python_Python 3.x_Macos_Metatrader5 - Fatal编程技术网

试图在Mac上安装带有Python3的MetaTrader5

试图在Mac上安装带有Python3的MetaTrader5,python,python-3.x,macos,metatrader5,Python,Python 3.x,Macos,Metatrader5,我正在尝试编写一个能够与MetaTrader5一起工作的Python算法。MT5是一个交易平台,运行时用于交易外汇、股票等 pip3 install MetaTrader5 我得到一份工作 命令“clang”失败,退出状态为1 owner@Owners-MacBook Pro~%pip3安装MetaTrader5 收集元数据5 使用缓存https://files.pythonhosted.org/packages/ee/3b/4424be9ca5772ddd7f249385785d6fcacc

我正在尝试编写一个能够与MetaTrader5一起工作的Python算法。MT5是一个交易平台,运行时用于交易外汇、股票等

pip3 install MetaTrader5
我得到一份工作

命令“clang”失败,退出状态为1

owner@Owners-MacBook Pro~%pip3安装MetaTrader5
收集元数据5
使用缓存https://files.pythonhosted.org/packages/ee/3b/4424be9ca5772ddd7f249385785d6fcacceef90fc45bf5c4946514ca245a/MetaTrader5-5.0.9.tar.gz
为收集的包构建控制盘:MetaTrader5
正在为MetaTrader5构建控制盘(setup.py)。。。错误
错误:命令出错,退出状态为1:
命令:/usr/local/opt/python/bin/python3.7-u-c'import sys,setuptools,tokenize;sys.argv[0]=“private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py”“”__文件“/private/var/folders/65/d9”g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py“”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(编译(代码,“'exec'”)'bdist_wheel-d/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-wheel-id676w5e——python标记cp37
cwd:/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/
完整输出(20行):
运转的车轮
运行构建
运行build\u py
创建构建
创建build/lib.macosx-10.15-x86_64-3.7
创建build/lib.macosx-10.15-x86_64-3.7/MetaTrader5
正在复制MetaTrader5/uuu init_uuuuu.py->build/lib.macosx-10.15-x86_64-3.7/MetaTrader5
运行build_ext
构建“MetaTrader5.C”扩展
创建构建/临时macosx-10.15-x86_64-3.7
创建build/temp.macosx-10.15-x86_64-3.7/src
创建build/temp.macosx-10.15-x86_64-3.7/src/Interprocess
创建build/temp.macosx-10.15-x86_64-3.7/src/Connector
clang-Wno未使用的结果-Wsign比较-Wunreachable代码-fno公共-dynamic-DNDEBUG-g-fwrapv-O3-Wall-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers-DUNICODE-Isrc-I/usr/local/include-I/usr/local/opt/openssl@1.1/include-I/usr/local/opt/sqlite/include-I/usr/local/cillar/python/3.7.6/Frameworks/python.framework/Versions/3.7/include/python3.7m-c src/MetaTrader.cpp-o build/temp.macosx-10.15-x86_64-3.7/src/MetaTrader.o
在src/MetaTrader.cpp中包含的文件中:6:
src/stdafx.h:16:10:致命错误:找不到“sdkddkver.h”文件
#包括
^~~~~~~~~~~~~
生成1个错误。
错误:命令“clang”失败,退出状态为1
----------------------------------------
错误:为MetaTrader5构建控制盘失败
为MetaTrader5运行setup.py clean
未能生成MetaTrader5
安装收集的软件包:MetaTrader5
正在为MetaTrader5运行setup.py安装。。。错误
错误:命令出错,退出状态为1:
命令:/usr/local/opt/python/bin/python3.7-u-c'import sys,setuptools,tokenize;sys.argv[0]=“private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py”“”__文件“/private/var/folders/65/d9”g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py“”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(compile(code,uuu file_uuu,“'exec'”)'安装--record/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-record-oit3fkwz/install-record.txt--外部管理的单一版本--编译
cwd:/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/
完整输出(20行):
正在运行的安装
运行构建
运行build\u py
创建构建
创建build/lib.macosx-10.15-x86_64-3.7
创建build/lib.macosx-10.15-x86_64-3.7/MetaTrader5
正在复制MetaTrader5/uuu init_uuuuu.py->build/lib.macosx-10.15-x86_64-3.7/MetaTrader5
运行build_ext
构建“MetaTrader5.C”扩展
创建构建/临时macosx-10.15-x86_64-3.7
创建build/temp.macosx-10.15-x86_64-3.7/src
创建build/temp.macosx-10.15-x86_64-3.7/src/Interprocess
创建build/temp.macosx-10.15-x86_64-3.7/src/Connector
clang-Wno未使用的结果-Wsign比较-Wunreachable代码-fno公共-dynamic-DNDEBUG-g-fwrapv-O3-Wall-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers-DUNICODE-Isrc-I/usr/local/include-I/usr/local/opt/openssl@1.1/include-I/usr/local/opt/sqlite/include-I/usr/local/cillar/python/3.7.6/Frameworks/python.framework/Versions/3.7/include/python3.7m-c src/MetaTrader.cpp-o build/temp.macosx-10.15-x86_64-3.7/src/MetaTrader.o
在src/MetaTrader.cpp中包含的文件中:6:
src/stdafx.h:16:10:致命错误:找不到“sdkddkver.h”文件
#包括
^~~~~~~~~~~~~
生成1个错误。
错误:命令“clang”失败,退出状态为1
----------------------------------------
错误:命令出错,退出状态为1:/usr/local/opt/python/bin/python3.7-u-c'import sys,setuptools,tokenize;sys.argv[0]=“private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py”“”__文件“/private/var/folders/65/d9”g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py“”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(编译(代码,“文件”“exec”“)”安装--record/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk
owner@Owners-MacBook-Pro ~ % pip3 install MetaTrader5
Collecting MetaTrader5
  Using cached https://files.pythonhosted.org/packages/ee/3b/4424be9ca5772ddd7f249385785d6fcacceef90fc45bf5c4946514ca245a/MetaTrader5-5.0.9.tar.gz
Building wheels for collected packages: MetaTrader5
  Building wheel for MetaTrader5 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py'"'"'; __file__='"'"'/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-wheel-id676w5e --python-tag cp37
       cwd: /private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/
  Complete output (20 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.15-x86_64-3.7
  creating build/lib.macosx-10.15-x86_64-3.7/MetaTrader5
  copying MetaTrader5/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/MetaTrader5
  running build_ext
  building 'MetaTrader5.C' extension
  creating build/temp.macosx-10.15-x86_64-3.7
  creating build/temp.macosx-10.15-x86_64-3.7/src
  creating build/temp.macosx-10.15-x86_64-3.7/src/Interprocess
  creating build/temp.macosx-10.15-x86_64-3.7/src/Connector
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DUNICODE -Isrc -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/MetaTrader.cpp -o build/temp.macosx-10.15-x86_64-3.7/src/MetaTrader.o
  In file included from src/MetaTrader.cpp:6:
  src/stdafx.h:16:10: fatal error: 'sdkddkver.h' file not found
  #include <sdkddkver.h>
           ^~~~~~~~~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for MetaTrader5
  Running setup.py clean for MetaTrader5
Failed to build MetaTrader5
Installing collected packages: MetaTrader5
    Running setup.py install for MetaTrader5 ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py'"'"'; __file__='"'"'/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-record-oit3fkwz/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/
    Complete output (20 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.15-x86_64-3.7
    creating build/lib.macosx-10.15-x86_64-3.7/MetaTrader5
    copying MetaTrader5/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/MetaTrader5
    running build_ext
    building 'MetaTrader5.C' extension
    creating build/temp.macosx-10.15-x86_64-3.7
    creating build/temp.macosx-10.15-x86_64-3.7/src
    creating build/temp.macosx-10.15-x86_64-3.7/src/Interprocess
    creating build/temp.macosx-10.15-x86_64-3.7/src/Connector
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DUNICODE -Isrc -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.6/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/MetaTrader.cpp -o build/temp.macosx-10.15-x86_64-3.7/src/MetaTrader.o
    In file included from src/MetaTrader.cpp:6:
    src/stdafx.h:16:10: fatal error: 'sdkddkver.h' file not found
    #include <sdkddkver.h>
             ^~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py'"'"'; __file__='"'"'/private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-install-5nv9pgx4/MetaTrader5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/65/d9_g2c8n6835f6nhxqqtwk900000gn/T/pip-record-oit3fkwz/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
owner@Owners-MacBook-Pro ~ % 
In file included from src/MetaTrader.cpp:6:
src/stdafx.h:16:10: fatal error: 'sdkddkver.h' file not found
#include <sdkddkver.h>
python3 -m pip install MetaTrader5
pip3 install MetaTrader5
Could not find a version that satisfies the requirement MetaTrader5 (from versions: )
import wheel.pep425tags
print(wheel.pep425tags.get_supported())
[('cp37', 'cp37m', 'linux_x86_64'), ('cp37', 'abi3', 'linux_x86_64'), ('cp37', 'none', 'linux_x86_64'), ('cp36', 'abi3', 'linux_x86_64'), ('cp35', 'abi3', 'linux_x86_64'), ('cp34', 'abi3', 'linux_x86_64'), ('cp33', 'abi3', 'linux_x86_64'),
 ('cp32', 'abi3', 'linux_x86_64'), ('cp37', 'none', 'any'), ('cp3', 'none', 'any'),
 ('cp36', 'none', 'any'), ('cp35', 'none', 'any'), ('cp34', 'none', 'any'), ('cp33', 'none', 'any'), ('cp32', 'none', 'any'), ('cp31', 'none', 'any'), ('cp30', 'none', 'any'), ('py3', 'none', 'linux_x86_64'), ('py37', 'none', 'any'), ('py3', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'),
 ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]
MetaTrader5-5.0.29-cp37-cp37m-win_amd64.whl
to
MetaTrader5-5.0.29-cp37-cp37m-linux_x86_64.whl
python3 -m pip install MetaTrader5-5.0.29-cp37-cp37m-linux_x86_64.whl
import MetaTrader5
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-824b43c0d46a> in <module>
----> 1 import MetaTrader5

~/mt5/env/lib/python3.7/site-packages/MetaTrader5/__init__.py in <module>
    250 
    251 # import C methods to our module
--> 252 from ._core import *
    253 
    254 # internal order send

ModuleNotFoundError: No module named 'MetaTrader5._core'