1、本地安装REMIX 确保版本是新的

npm install -g @remix-project/remixd

2、将你的文件路径建立映射 –remix-ide 后的参数与你输入的网址一致 注意是https

remixd -s D:\www\remix --remix-ide https://remix.ethereum.org

3、
浏览器打开https://remix.ethereum.org , workspace选择localhost

4.Github上拉取OpenZeppelin合约库
这里因为我npm安装有问题,所以直接将Github上的contracts文件拉入第二步创建的本地文件夹,用相对路径调用OpenZeppelin合约。

Github:OpenZeppelin/openzeppelin-contracts: OpenZeppelin Contracts is a library for secure smart contract development. (github.com)

只需要把contracts文件拉入第二步关联的本地文件夹即可。

5.调用OpenZeppelin内的合约
使用相对路径引入合约,就可以使用了

import "./@openzeppelin/contracts/token/ERC20/ERC20.sol";

OpenZeppelin合约库 学习文档
https://docs.openzeppelin.com/contracts/4.x/