首页 > 解决方案 > 我无法在 python 或solidity 中导入我需要的任何东西

问题描述

我正在做一个项目,我似乎无法导入我需要的任何东西。我正在使用 VScode 和 Web3.py 和布朗尼。我尝试导入 pygame 只是为了看看我是否可以并且出于某种原因它有效。一些例子:

Python 导入:from brownie import network, config, accounts, FundMe

错误:ModuleNotFoundError: No module named 'brownie'

Solidity 导入:import "@openzeppelin/contracts/token/ERC721/ERC721.sol";

错误:Source "@openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File import callback not supported

Solidity 导入:import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.3.0/contracts/math/SafeMath.sol";

错误:Source "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.3.0/contracts/math/SafeMath.sol" not found: File import callback not supported

Solidity 导入:import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";

错误:Source "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" not found: File import callback not supported

我认为它们安装正确。例如,我仍然可以使用所有普通的 Brownie 命令。我已经坚持了三天,但无济于事。任何建议都是传奇谢谢

标签: pythonethereumsolidityweb3web3py

解决方案


推荐阅读