prescription
Dependency conflicts are a common problem in Python projects, here is a step-by-step solution:
- Use of isolated environments: It is recommended to create a virtual environment first to avoid global contamination
python -m venv vnpy_envsource vnpy_env/bin/activate # Linux/Macvnpy_envScriptsactivate # Windows - Step-by-step installation of dependencies: Install the base core library before installing the interface modules
pip install -r requirements.txt --ignore-installed - Interface-Specific Handling: If CTP or other interfaces report errors, try installing the specified version separately.
pip install vnpy_ctp==3.x.x - Version Diagnostic Tool: Checking dependency trees with pipdeptree
pip install pipdeptreepipdeptree --warn silence
If the problem persists, try again:
- Using the VN Studio integrated environment (with preconfigured dependencies)
- Check GitHub Issues for solutions to similar problems.
- Reduce Python version to 3.7-3.9 (best compatibility range)
This answer comes from the articleVeighNa: a popular open source quantitative trading framework in ChinaThe































