这是我的代码:
from oandapyV20 import API
import oandapyV20.endpoints.trades as trades
api = API(access_token="xxx")
accountID = "xxx-xxx-xxxxxxx-xxx"
r = trades.TradesList(accountID)
print("REQUEST:{}".format(r))
rv = api.request(r)
print("RESPONSE:\n{}".format(json.dumps(rv, indent=2)))
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\oanda tester.py", line 10, in <module>
rv = api.request(r)
File "C:\Python37\lib\site-packages\oandapyV20\oandapyV20.py", line 306, in request
request_args, headers=headers)
File "C:\Python37\lib\site-packages\oandapyV20\oandapyV20.py", line 243, in __request
response.content.decode('utf-8'))
oandapyV20.exceptions.V20Error: {"errorMessage":"Insufficient authorization to perform request."}
Run Code Online (Sandbox Code Playgroud)
我的令牌和帐户信息是正确的。
该代码是直接从文档复制的。
我在这里错过了什么吗?
我正在尝试在我的 Windows 11 计算机上安装支持 CUDA 的 PyTorch,该计算机已安装 CUDA 12 和 python 3.10。当我运行 nvcc --version 时,我得到以下输出:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Aug_15_22:09:35_Pacific_Daylight_Time_2023
Cuda compilation tools, release 12.2, V12.2.140
Build cuda_12.2.r12.2/compiler.33191640_0
Run Code Online (Sandbox Code Playgroud)
我想安装具有 CUDA 支持的 PyTorch 版本 2.0.0,因此我尝试运行以下命令:
python -m pip install torch==2.0.0+cu117
Run Code Online (Sandbox Code Playgroud)
但是,我遇到了以下错误:
ERROR: Could not find a version that satisfies the requirement torch==2.0.0+cu117 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1)
ERROR: No matching distribution found for torch==2.0.0+cu117
Run Code Online (Sandbox Code Playgroud)
有没有人有什么建议?