最近一直使用Remix浏览器写合约,但是Remix不知哪一时刻就会崩,遇到很多次了,怕代码丢失,因此下载安装本地Remix-IDE。当然本地安装的Remix-IDE在使用时也会出现崩溃的情况,但是至少源码保存在本地了。

1、安装Remix-IDE

下载安装文件, 下载地址:https://github.com/ethereum/remix-desktop/releases

 选择exe文件下载,然后正常安装即可。

打开Remix IDE,一直在空白页面不变,选择File -> Open Folder,一直没反应,关闭重新打开还是这个空白页面

于是一直处于此状态不动,过了几小时后,想起来使用这个IDE,但是仍然是空白页面,关闭此窗囗再重新打开,发现可以使用了(不知道那几个小时做了什么),与Remix浏览器页面大致相同,如下图所示:

 在使用时会出现突然白屏的情况,可以关闭重新打开窗囗,如果打开窗囗仍然白屏,可以在科学上网的环境下再次打开。

2、安装本地Remix IDE使用文档(可不装)

本地Remix-IDE文档与在线文档内容一样,在线文档地址:Welcome to Remix’s documentation! — Remix - Ethereum IDE 1 documentation 

(1)前提条件

依赖python3与pip3,安装可参考:Windows下的python3和pip3安装与配置_shangyj17的博客-CSDN博客_windows安装pip3

(2)安装Remix-IDE文档

参见:GitHub - ethereum/remix-ide: Documentation for Remix IDE

文档中有安装命令,使用pip3安装时报错,在pip3 后面加上 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com 即可,如下所示(依次执行下面5条命令):

pip3 install sphinx sphinx_rtd_theme -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
pip3 install recommonmark  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
git clone https://github.com/ethereum/remix-ide.git
cd docs/
make html

安装注意事项 

pip3命令若不加 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com,执行第一条,报错,反复执行几次,同样的错误,错误信息如下所示:

E:\Programs>pip3 install sphinx sphinx_rtd_theme
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/sphinx/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/sphinx/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/sphinx/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/sphinx/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))': /simple/sphinx/
Could not fetch URL https://pypi.org/simple/sphinx/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/sphinx/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))) - skipping
ERROR: Could not find a version that satisfies the requirement sphinx (from versions: none)
ERROR: No matching distribution found for sphinx

pip3命令加上 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com,执行成功,

如下所示:

E:\Programs>pip3 install sphinx sphinx_rtd_theme  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Looking in indexes: http://pypi.douban.com/simple
Collecting sphinx
  Downloading http://pypi.doubanio.com/packages/91/96/9cbbc7103fb482d5809fe4976ecb9b627058210d02817fcbfeebeaa8f762/Sphinx-4.5.0-py3-none-any.whl (3.1 MB)
     ---------------------------------------- 3.1/3.1 MB 2.1 MB/s eta 0:00:00
Collecting sphinx_rtd_theme
  Downloading http://pypi.doubanio.com/packages/e0/d2/3818e4730e314719e27f639c44164419e40eed826d63753dc480262036e8/sphinx_rtd_theme-1.0.0-py2.py3-none-any.whl (2.8 MB)
     ---------------------------------------- 2.8/2.8 MB 2.2 MB/s eta 0:00:00
Collecting sphinxcontrib-jsmath
  Downloading http://pypi.doubanio.com/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting sphinxcontrib-qthelp
  Downloading http://pypi.doubanio.com/packages/2b/14/05f9206cf4e9cfca1afb5fd224c7cd434dcc3a433d6d9e4e0264d29c6cdb/sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)
     ---------------------------------------- 90.6/90.6 KB 1.7 MB/s eta 0:00:00
# 省略下面输出信息

(3)浏览文档

进入remix-ide\docs\_build\html,打开index.html,如下图所示:

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐