木瓜叔叔 發表於 2020-9-22 17:26:00

linux服务器强化学习平台搭建(sumo安装)

<div style="font-family: &quot;Helvetica Neue&quot;, Helvetica, Tahoma, Arial, &quot;Hiragino Sans GB&quot;, STHeiti, &quot;Microsoft YaHei&quot;, &quot;微软雅黑&quot;, &quot;WenQuanYi Micro Hei&quot;, STXihei, &quot;华文细黑&quot;, Heiti, &quot;黑体&quot;, SimSun, &quot;宋体&quot;, Song, sans-serif; font-size: 16px; line-height: 1.8; font-weight: normal; color: rgba(47, 47, 47, 1); word-wrap: break-word">
        <div class="preview html_preview xsj_public" style="max-width: 100%"><p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">Anaconda环境迁移</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">anaconda base 3.7.4</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">mujoco-py环境还没有配置安装mujoco-py因为注册表的原因</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">flow环境安装还有问题:已解决</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em"></p><div class="story_image_container story_block_image" style="text-align: center"><div class="story_image" style="display: inline-block; position: relative; max-width: 100%"><img src="http://cdn.drxlchan.com/xiaoshujian/1599673075180.png" style="height: auto; max-width: 100%; vertical-align: middle; border: 0; border-radius: 0.3125em; box-shadow: 0 2px 4px rgba(34, 36, 38, 0.12), 0 2px 10px rgba(34, 36, 38, 0.08)"><br><div class="story_image_caption story_image_blank_caption" style="border-bottom: 1px solid rgba(217, 217, 217, 1); display: none; color: rgba(153, 153, 153, 1); padding: 10px"></div></div></div><p style="margin: 1.1em 0 1.6em"></p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">tf-keras-rl</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">pip安装所需包时,出现错误</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">好像是pillow的问题,已解决。更换了一下安装顺序,把pillow最后安装</p>
<h2 class="xsj_heading_hash xsj_heading xsj_heading_h2" id="e8bf81e7a7bbe696b9e6b395e4b88ee6ada5e9aaa4_1" style="font-weight: bold; text-rendering: optimizelegibility; font-size: 1.8rem; margin: 0.7em 0 0.5em"><div class="xiaoshujiang_element xsj_anchor" style="overflow: hidden; float: right">

</div>
<span class="xsj_heading_content">迁移方法与步骤</span></h2>
<ul class="markdown_ul" style="padding: 0; margin: 1.1em 0 1.1em 3em">
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>安装Jetbrain toolbox,然后更改安装位置,安装pycharm</p>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>安装anaconda,下载anaconda的包,bash安装</p>
<ul class="markdown_ul" style="padding: 0; margin: 0 0 0 1em">
<li>
<p class="xsj_paragraph xsj_paragraph_level_4" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>原环境备份导出:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto"><span class="hljs-comment" style="overflow: visible !important; color: rgba(136, 136, 136, 1)"># 激活将导出的环境</span>
conda activate environment
<span class="hljs-comment" style="overflow: visible !important; color: rgba(136, 136, 136, 1)"># 将原有服务器上面的环境导出</span>
conda env export &gt; environment.yaml
<span class="hljs-comment" style="overflow: visible !important; color: rgba(136, 136, 136, 1)"># 导出pip安装的包</span>
pip freeze &gt; requirement.txt</code></pre></div>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_4" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>目标机执行导入环境操作:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">conda env create -f environment.yaml
<span class="hljs-comment" style="overflow: visible !important; color: rgba(136, 136, 136, 1)"># 进入新建的环境</span>
conda activate environment
pip install -r requirement.txt</code></pre></div>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_4" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>检查tensorflow环境,pytorch环境,GPU,cuda等是否安装</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">python
import tensorflow as tf
tf.test.is_built_with_cuda()
tf.test.is_gpu_available() <span class="hljs-comment" style="overflow: visible !important; color: rgba(136, 136, 136, 1)"># 目前返回False说明还存在问题</span></code></pre></div>
</li>
</ul>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em">SUMO安装</p>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>安装下载Flow</p>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>使用google Chrome,并且配置FQ插件</p>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>搜狗输入法安装,记得把搜狗输入法置于第二位,不会显示乱码</p>
</li>
</ul>
<h3 class="xsj_heading_hash xsj_heading xsj_heading_h3" id="sumoe5ae89e8a385_2" style="font-weight: bold; text-rendering: optimizelegibility; font-size: 1.6rem; margin: 0.6em 0 0.4em"><div class="xiaoshujiang_element xsj_anchor" style="overflow: hidden; float: right">

</div>
<span class="xsj_heading_content">SUMO安装</span></h3>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">目前进展:</p>
<ul class="markdown_ul" style="padding: 0; margin: 1.1em 0 1.1em 3em">
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>根据flow的安装教程安装flow与sumo:https://github.com/flow-project/flow/blob/master/docs/source/flow_setup.rst#optional-direct-install-of-sumo-from-github</p>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>sumo安装出现问题:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">(base) ubuntu@host-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">192</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">168</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">96</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">5</span>:~/<span class="hljs-keyword" style="overflow: visible !important; font-weight: bold">data</span>/sumo$ sudo apt-get install projlibtool libgdal1-dev libxerces-c2-dev libfox-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.6</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">0</span> libfox-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.6</span>-dev
sudo: unable to resolve host host-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">192</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">168</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">96</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">5</span>
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package libxerces-c2-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package proj is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'proj'</span> has no installation candidate
E: Package <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'libxerces-c2-dev'</span> has no installation candidate
</code></pre></div>
<h4 class="xsj_heading_hash xsj_heading xsj_heading_h4" id="optional20direct20install20of20sumo20from20github_3" style="font-weight: bold; text-rendering: optimizelegibility; font-size: 1.5rem; margin: 0.5em 0 0.3em"><div class="xiaoshujiang_element xsj_anchor" style="overflow: hidden; float: right">

</div>
<span class="xsj_heading_content">(Optional) Direct install of SUMO from GitHub</span></h4>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>The below commands walk you through installing and building SUMO locally. Note that if this does not work, you are recommended to point an issue on the flow-dev message board or refer to SUMO's documentation regarding installing their software.</p>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>We begin by downloading SUMO's github directory:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">cd ~
git clone https://github.com/eclipse/sumo.git
cd sumo
git checkout <span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">2147</span>d155b1
make -f Makefile.cvs</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>If you have Ubuntu 14.04+, run the following command</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">./configure
make -j<span class="hljs-variable" style="overflow: visible !important; color: rgba(188, 96, 96, 1)">$nproc</span>
echo <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'export SUMO_HOME="$HOME/sumo"'</span> &gt;&gt; ~/.bashrc
echo <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'export PATH="$HOME/sumo/bin:$PATH"'</span> &gt;&gt; ~/.bashrc
echo <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'export PYTHONPATH="$HOME/sumo/tools:$PYTHONPATH"'</span> &gt;&gt; ~/.bashrc
source ~/.bashrc</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>按照上面教程走到./configure之后出现错误:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">Optional features summary
-------------------------
Enabled: PROJ GDAL GUI
Disabled: Debug Profiling Coverage PIC UnitTests Python OSG ffmpeg</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>不用去管上述的错误,直接进行。要注意的是安装apt-get依赖的时候要根据第四个教程的ubuntu14.04的,而不是12.04的.。然后后续安装按照flow的教程</p>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>主要根据第四份的教程</p>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="story_inline_image" style="display: inline-block"><img src="http://cdn.drxlchan.com/xiaoshujian/1599673100082.png" style="height: auto; max-width: 100%; vertical-align: bottom; border: 0"></span></p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">git checkout <span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">2147</span>d155b1
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">297</span>make -f Makefile.cvs
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">298</span>./configure
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">299</span>sudo apt-get install autoconf
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">300</span>sudo apt-get install projlibtool libgdal1-dev libxerces-c2-dev libfox-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.6</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">0</span> libfox-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.6</span>-dev
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">301</span>sudo ./configure --with-fox-includes=/usr/include/fox-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.6</span> --with-gdal-includes=/usr/include/gdal --with-proj-libraries=/usr/lib --with-gdal-libraries=/usr --with-proj-gdal
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">302</span>sudo apt-get install autoconf
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">303</span>sudo apt-get install libproj-dev proj-bin proj-datalibtool libgdal1-dev libxerces-c3-dev libfox-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.6</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">0</span> libfox-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.6</span>-dev
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">304</span>cd /usr/lib
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">305</span>sudo ln -s libgdal1.<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">7.0</span>.so libgdal.so
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">306</span>sudo ln -s libproj.so.<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">0.7</span>.<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">0</span> proj-lib.so
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">309</span>cd ~
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">310</span>cd sumo
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">311</span>cd <span class="hljs-keyword" style="overflow: visible !important; font-weight: bold">data</span>
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">312</span>cd sumo
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">313</span>sudo aclocal
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">314</span>sudo automake
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">315</span>sudo automake --add-missing
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">316</span>sudo ./configure --with-fox-includes=/usr/include/fox-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.6</span> --with-gdal-includes=/usr/include/gdal --with-proj-libraries=/usr/lib --with-gdal-libraries=/usr --with-proj-gdal
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">317</span>sudo make -j<span class="hljs-variable" style="overflow: visible !important; color: rgba(188, 96, 96, 1)">$nproc</span>
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">318</span>echo <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'export SUMO_HOME="/home/ubuntu/data/sumo"'</span> &gt;&gt; ~/.bashrc
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">319</span>echo <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'export PATH="/home/ubuntu/data/sumo/bin:$PATH"'</span> &gt;&gt; ~/.bashrc
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">320</span>echo <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'export PYTHONPATH="/home/ubuntu/data/sumo/tools:$PYTHONPATH"'</span> &gt;&gt; ~/.bashrc
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">321</span>source ~/.bashrc
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">322</span>sumo-gui
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">323</span>sumo
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">324</span>echo <span class="hljs-variable" style="overflow: visible !important; color: rgba(188, 96, 96, 1)">$SUMO_HOME</span>
<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">325</span> (base) ubuntu@host-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">192</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">168</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">96</span>-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">5</span>:~/<span class="hljs-keyword" style="overflow: visible !important; font-weight: bold">data</span>/sumo$ </code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>用上述方法就不需要移动sumo文件到处都是,就在data/sumo下面,这样就比较清晰<br>
要使用pycharm还要设置环境变量SUMO_HOME和添加tools:<br>
安装完成后:确保sumo-*下有四个文件夹--未必<br>
而且在终端命令行输入sumo或者sumo-gui都可以执行<br>
最后更改环境变量gedit ~/.bashrc source ~/.bashrc</p>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>如果使用的是pycharm编译器,需要更改edit Configurations与Project Structure<br>
Edit Configurations:RUN下面,是添加SUMO_HOME环境变量,即sumo-*所在的位置</p>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>Project Structure:添加sumo下的tools文件夹路径。file -&gt;settings -&gt;project -&gt;project structure -&gt;Add Content Root -&gt;选择sumo的tools文件夹路径 -&gt;ok</p>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>或者从终端启用Pycharm<br>
具体原因来自于PyCharm ignoring LD_LIBRARY_PATH from .bashrc</p>
</li>
</ul>
<h4 class="xsj_heading_hash xsj_heading xsj_heading_h4" id="e58d87e7baa7e887b3sumo-160_4" style="font-weight: bold; text-rendering: optimizelegibility; font-size: 1.5rem; margin: 0.5em 0 0.3em"><div class="xiaoshujiang_element xsj_anchor" style="overflow: hidden; float: right">

</div>
<span class="xsj_heading_content">升级至sumo-1.6.0</span></h4>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">sumo 1.1.0之后的版本不支持上述方式安装了,只能使用https://sumo.dlr.de/docs/Installing/Linux_Build.html安装,但是不能与其他版本共存,于是先不升级。sumo1.1之后的版本更好安装了。</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">按照教程来吧,网址如下哟:</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">https://sumo.dlr.de/docs/Installing/Linux_Build.html#Building_the_SUMO_binaries_with_cmakesumo.dlr.de</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">让我们开始吧~</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">hold on,如果你已经安装过sumo,需要先卸载旧的版本哦。如果你从未装过sumo,跳过卸载的步骤。</p>
<hr class="xsj_hr xsj_minus" style="margin: 20px 0; border-top: 1px dashed rgba(47, 47, 47, 1); border-right: 90px solid rgba(0, 0, 0, 0); border-bottom: 0; border-left: 90px solid rgba(0, 0, 0, 0)">
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">卸载sumo,分两种类型</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">1)若是apt-get 安装,则直接apt-get remove</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">sudo apt-get remove sumo
sudo apt-get remove sumo-tools
sudo apt-get remove sumo-docs</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">2)若是make install编译安装,则</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">参考: https://stackoverflow.com/questions/36256049/uninstall-sumo-0-22</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">试试下面三种方法</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">i)在sudo make install的目录下执行:sudo make uninstall</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">ii)如果你找不到安装目录啦,去/usr/local/bin删除下面的文件</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">cd /usr/local/bin
sudo rm activitygen dfrouter emissionsDrivingCycle jtrrouter marouter od2trips sumo-gui TraCITestClient duarouter emissionsMap netconvert netgenerate polyconvert sumo</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">iii)如果你还能找到安装目录,进入sumo的bin文件目录,删除下面的文件</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">sudo rm activitygen dfrouter emissionsDrivingCycle jtrrouter marouter od2trips sumo-gui TraCITestClient duarouter emissionsMap netconvert netgenerate polyconvert sumo</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">最后,记得删除整个sumo文件夹,sudo rm -r+你的SUMO版本</p>
<hr class="xsj_hr xsj_minus" style="margin: 20px 0; border-top: 1px dashed rgba(47, 47, 47, 1); border-right: 90px solid rgba(0, 0, 0, 0); border-bottom: 0; border-left: 90px solid rgba(0, 0, 0, 0)">
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">下面进入正题,参考官方教程 安装sumo-1.5.0啦</p>
<ol class="markdown_ol" style="padding: 0; margin: 1.1em 0 1.1em 3em">
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>首先,安装需要的库和依赖</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">sudo apt-get install cmake python g++ libxerces-c-dev libfox-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.6</span>-dev libgdal-dev libproj-dev libgl2ps-dev swig</code></pre></div>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>下载安装包<br>
去这里下载安装包:https://sourceforge.net/projects/sumo/files/sumo/<br>
我下载的是sumo-src-1.5.0.tar.gz</p>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>在home下解压,然后</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">tar xzf sumo-src-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.5</span>.<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">0</span>.tar.gz
cd sumo-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.5</span>.<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">0</span>
pwd </code></pre></div>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>修改SUMO_HOME路径</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">export SUMO_HOME=<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">"/home/&lt;user&gt;/sumo-1.5.0"</span>
echo <span class="hljs-variable" style="overflow: visible !important; color: rgba(188, 96, 96, 1)">$SUMO_HOME</span></code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>结果应该显示:/home/&lt;用户名&gt;/sumo-1.5.0</p>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>用到cmake开始build</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-poweshell hljs" data-info="poweshell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">mkdir build/cmake-build
cd build/cmake-build
cmake ../..</code></pre></div>
</li>
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>make</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">make -j $(nproc)</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>或者</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">make -j $(grep -c ^processor /proc/cpuinfo)</code></pre></div>
</li>
</ol>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">可能的问题:</p>
<ol class="markdown_ol" style="padding: 0; margin: 1.1em 0 1.1em 3em">
<li>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>终端输入sumo-gui不能打开sumo仿真界面?<br>
试试下面的方法呢<br>
首先打开bashrc:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">sudo gedit ~/.bashrc</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>添加:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">export PATH=/home/[我的用户名]/sumo-<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">1.5</span>.<span class="hljs-number" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">0</span>/bin:<span class="hljs-variable" style="overflow: visible !important; color: rgba(188, 96, 96, 1)">$PATH</span></code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_2" style="margin: 1.1em 0 1.6em"><span class="xsj_placeholder_span"></span>记得让修改的路径生效:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-bash hljs" data-info="bash" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto"><span class="hljs-built_in" style="overflow: visible !important; color: rgba(57, 115, 0, 1)">source</span> ~/.bashrc</code></pre></div>
</li>
</ol>
<h4 class="xsj_heading_hash xsj_heading xsj_heading_h4" id="e58d87e7baa7e887b3sumo-170_5" style="font-weight: bold; text-rendering: optimizelegibility; font-size: 1.5rem; margin: 0.5em 0 0.3em"><div class="xiaoshujiang_element xsj_anchor" style="overflow: hidden; float: right">

</div>
<span class="xsj_heading_content">升级至sumo-1.7.0</span></h4>
<ol class="markdown_ol" style="padding: 0; margin: 1.1em 0 1.1em 3em">
<li><span class="xsj_placeholder_span"></span>可以不用卸载原来的包<code style="background-color: rgba(240, 240, 240, 1); border-radius: 4px; padding: 2px 4px; margin: 0 0.225em; color: rgba(136, 0, 0, 1); border: 0; font-size: 0.9em">data/sumo</code></li>
<li><span class="xsj_placeholder_span"></span>下载安装包到任意位置,包名通常为<code style="background-color: rgba(240, 240, 240, 1); border-radius: 4px; padding: 2px 4px; margin: 0 0.225em; color: rgba(136, 0, 0, 1); border: 0; font-size: 0.9em">sumo-x.x.x</code></li>
<li><span class="xsj_placeholder_span"></span>步骤如上</li>
<li><span class="xsj_placeholder_span"></span>编译成功后将<code style="background-color: rgba(240, 240, 240, 1); border-radius: 4px; padding: 2px 4px; margin: 0 0.225em; color: rgba(136, 0, 0, 1); border: 0; font-size: 0.9em">sumo-x.x.x</code>移动到<code style="background-color: rgba(240, 240, 240, 1); border-radius: 4px; padding: 2px 4px; margin: 0 0.225em; color: rgba(136, 0, 0, 1); border: 0; font-size: 0.9em">data</code>并重命名为<code style="background-color: rgba(240, 240, 240, 1); border-radius: 4px; padding: 2px 4px; margin: 0 0.225em; color: rgba(136, 0, 0, 1); border: 0; font-size: 0.9em">data/sumo</code>这样就可以不用更改<code style="background-color: rgba(240, 240, 240, 1); border-radius: 4px; padding: 2px 4px; margin: 0 0.225em; color: rgba(136, 0, 0, 1); border: 0; font-size: 0.9em">~/.bashrc</code>文件</li>
</ol>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">本次安装出现问题:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-bash hljs" data-info="bash" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFFdOpen@LIBTIFF_4.0'</span>
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFClose@LIBTIFF_4.0'</span>
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFSetField@LIBTIFF_4.0<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'
collect2: error: ld returned 1 exit status
src/polyconvert/CMakeFiles/polyconvert.dir/build.make:346: recipe for target '</span>../../bin/polyconvertD<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">' failed
make: *** [../../bin/polyconvertD] Error 1
CMakeFiles/Makefile2:2711: recipe for target '</span>src/polyconvert/CMakeFiles/polyconvert.dir/all<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">' failed
make: *** Error 2
make: *** Waiting for unfinished jobs....
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0'</span>
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFFdOpen@LIBTIFF_4.0<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'</span>
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFClose@LIBTIFF_4.0<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFSetField@LIBTIFF_4.0'</span>
collect2: error: ld returned 1 <span class="hljs-built_in" style="overflow: visible !important; color: rgba(57, 115, 0, 1)">exit</span> status
src/netgen/CMakeFiles/netgenerate.dir/build.make:241: recipe <span class="hljs-keyword" style="overflow: visible !important; font-weight: bold">for</span> target <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'../../bin/netgenerateD'</span> failed
make: *** [../../bin/netgenerateD] Error 1
CMakeFiles/Makefile2:2199: recipe <span class="hljs-keyword" style="overflow: visible !important; font-weight: bold">for</span> target <span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'src/netgen/CMakeFiles/netgenerate.dir/all'</span> failed
make: *** Error 2
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFFdOpen@LIBTIFF_4.0'</span>
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFClose@LIBTIFF_4.0'</span>
//usr/lib/x86_64-linux-gnu/libpoppler.so.58: undefined reference to `TIFFSetField@LIBTIFF_4.0<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">'
collect2: error: ld returned 1 exit status
src/CMakeFiles/netconvert.dir/build.make:115: recipe for target '</span>../../bin/netconvertD<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">' failed
make: *** [../../bin/netconvertD] Error 1
CMakeFiles/Makefile2:614: recipe for target '</span>src/CMakeFiles/netconvert.dir/all<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">' failed
make: *** Error 2
Makefile:138: recipe for target '</span>all<span class="hljs-string" style="overflow: visible !important; color: rgba(136, 0, 0, 1)">' failed
make: *** Error 2</span></code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em"><code style="background-color: rgba(240, 240, 240, 1); border-radius: 4px; padding: 2px 4px; margin: 0 0.225em; color: rgba(136, 0, 0, 1); border: 0; font-size: 0.9em">make -j $(nproc)</code>之后出现上述问题,分析后是因为libtiff包在anaconda3里面产生冲突</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-bash hljs" data-info="bash" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">locate libtiff.so</code></pre></div>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-bash hljs" data-info="bash" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">/home/ubuntu/data/anacond3/envs/node33-base/lib/libtiff.so
/home/ubuntu/data/anacond3/envs/node33-base/lib/libtiff.so.5
/home/ubuntu/data/anacond3/envs/node33-base/lib/libtiff.so.5.4.0
/home/ubuntu/data/anacond3/envs/tf-keras-rl/lib/libtiff.so
/home/ubuntu/data/anacond3/envs/tf-keras-rl/lib/libtiff.so.5
/home/ubuntu/data/anacond3/envs/tf-keras-rl/lib/libtiff.so.5.4.0
/home/ubuntu/data/anacond3/envs/tf_gpu_env/lib/libtiff.so
/home/ubuntu/data/anacond3/envs/tf_gpu_env/lib/libtiff.so.5
/home/ubuntu/data/anacond3/envs/tf_gpu_env/lib/libtiff.so.5.2.4
/home/ubuntu/data/anacond3/lib/libtiff.so
/home/ubuntu/data/anacond3/lib/libtiff.so.5
/home/ubuntu/data/anacond3/lib/libtiff.so.5.5.0
/home/ubuntu/data/anacond3/pkgs/libtiff-4.0.10-h2733197_2/lib/libtiff.so
/home/ubuntu/data/anacond3/pkgs/libtiff-4.0.10-h2733197_2/lib/libtiff.so.5
/home/ubuntu/data/anacond3/pkgs/libtiff-4.0.10-h2733197_2/lib/libtiff.so.5.4.0
/home/ubuntu/data/anacond3/pkgs/libtiff-4.0.10-hfc65ed5_1004/lib/libtiff.so
/home/ubuntu/data/anacond3/pkgs/libtiff-4.0.10-hfc65ed5_1004/lib/libtiff.so.5
/home/ubuntu/data/anacond3/pkgs/libtiff-4.0.10-hfc65ed5_1004/lib/libtiff.so.5.4.0
/home/ubuntu/data/anacond3/pkgs/libtiff-4.0.6-3/lib/libtiff.so
/home/ubuntu/data/anacond3/pkgs/libtiff-4.0.6-3/lib/libtiff.so.5
/home/ubuntu/data/anacond3/pkgs/libtiff-4.0.6-3/lib/libtiff.so.5.2.4
/home/ubuntu/data/anacond3/pkgs/libtiff-4.1.0-h2733197_1/lib/libtiff.so
/home/ubuntu/data/anacond3/pkgs/libtiff-4.1.0-h2733197_1/lib/libtiff.so.5
/home/ubuntu/data/anacond3/pkgs/libtiff-4.1.0-h2733197_1/lib/libtiff.so.5.5.0
/usr/lib/x86_64-linux-gnu/libtiff.so
/usr/lib/x86_64-linux-gnu/libtiff.so.5
/usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">然后把 anaconda3下面的 libtiff.so移走</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-bash hljs" data-info="bash" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">mkdir /home/ubuntu/data/bak
mv /home/ubuntu/data/anacond3/lib/libtiff.so* ~/data/bak/</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">重新编译后成功</p>
<hr class="xsj_hr xsj_minus" style="margin: 20px 0; border-top: 1px dashed rgba(47, 47, 47, 1); border-right: 90px solid rgba(0, 0, 0, 0); border-bottom: 0; border-left: 90px solid rgba(0, 0, 0, 0)">
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">tf_gpu_env下安装mujoco的情况:</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">按照教程已安装好mujoco150,运行:</p>
<div class="xiaoshujiang_code_container" style="margin: 1em 0 2em; position: relative"><pre data-processed="true" style="line-height: initial !important; word-wrap: break-word; tab-size: 4; white-space: pre-wrap; font-family: monospace; margin: 0"><code class="language-powershell hljs" data-info="powershell" style="background: rgba(240, 240, 240, 1); border-radius: 4px; padding: 0.5em; margin: 0 0.225em; color: rgba(68, 68, 68, 1); border: 0; font-size: 0.9em; overflow: visible !important; display: block; overflow-x: auto">./simulate ../model/humanoid.xml</code></pre></div>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">结果:</p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em"></p><div class="story_image_container story_block_image" style="text-align: center"><div class="story_image" style="display: inline-block; position: relative; max-width: 100%"><img src="http://cdn.drxlchan.com/xiaoshujian/1599673128747.png" style="height: auto; max-width: 100%; vertical-align: middle; border: 0; border-radius: 0.3125em; box-shadow: 0 2px 4px rgba(34, 36, 38, 0.12), 0 2px 10px rgba(34, 36, 38, 0.08)"><br><div class="story_image_caption story_image_blank_caption" style="border-bottom: 1px solid rgba(217, 217, 217, 1); display: none; color: rgba(153, 153, 153, 1); padding: 10px"></div></div></div><p style="margin: 1.1em 0 1.6em"></p>
<p class="xsj_paragraph xsj_paragraph_level_0" style="margin: 1.1em 0 1.6em">出现无法显示的问题,先暂且到这儿。</p>
</div>
</div><br><br>
来源:https://www.cnblogs.com/xlchan/p/13713460.html
頁: [1]
查看完整版本: linux服务器强化学习平台搭建(sumo安装)