WonderTrade 笔记

  • 安装教程
  1. 创建环境
conda create -n wondertrade python=3.9
conda activate wondertrade
  1. 安装 wtpy
pip install wtpy
  1. 版本重新配置
  • 在未进行版本重新配置时, import 时会提示如下错误
Traceback (most recent call last):
	File "", line 1, in 
	File "C:\ProgramData\Anaconda3\envs\wondertrade\lib\site-packages\wtpy\__init__.py", line 13, in 
		from .WtDtServo import WtDtServo
	File "C:\ProgramData\Anaconda3\envs\wondertrade\lib\site-packages\wtpy\WtDtServo.py", line 5, in 
		from flask import Flask, session, redirect, request, make_response
	File "C:\ProgramData\Anaconda3\envs\wondertrade\lib\site-packages\flask\__init__.py", line 19, in 
		from . import json
	File "C:\ProgramData\Anaconda3\envs\wondertrade\lib\site-packages\flask\json\__init__.py", line 15, in 
		from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (C:\ProgramData\Anaconda3\envs\wondertrade\lib\site-packages\itsdangerous\__init__.py)
  • 重新安装
pip uninstall itsdangerous
pip install itsdangerous==2.0.1

你可能感兴趣的:(flask,python,后端)