擅长:python、mysql、java
<p>这样做:</p>
<pre><code>pkg install python2
</code></pre>
<p>用Python做什么</p>
<pre><code>python2 yourcode.py
</code></pre>
<p>用于Python3</p>
<pre><code>python3 yourcode.py
</code></pre>
<p>若要检查版本,请执行以下操作:</p>
<pre><code>python - -version
</code></pre>
<p>它会给我3.9.2分,给你3.6分,但如果你检查一下</p>
<pre><code>python2 - - version
</code></pre>
<p>它将给出结果2.7.18</p>
<p>这是证据:
<img src="https://i.stack.imgur.com/uLEmq.jpg" alt="Proof"/></p>