ValueError: Unknown projection '3d' (once again) : <p><strong>Context:</strong> using Spyder version 3.3.4</p>

<p>When executing this line of code:</p>

<pre><code>import matplotlib.pyplot as plt

#your code

fig = plt.figure()
ax = fig.gca(projection='3d')
</code></pre>

<p>I have an output error:</p>

<pre><code>raise ValueError("Unknown projection %r" % projection)

ValueError: Unknown projection '3d'

&lt;Figure size 432x288 with 0 Axes&gt;
</code></pre>

<p>The same program is running on an old laptop where </p>

<pre><code>print('matplotlib: {}'.format(matplotlib.__version__))
</code></pre>

<p>While on a new machine:</p>

<pre><code>print('matplotlib: {}'.format(matplotlib.__version__))
matplotlib: 1.5.0rc3
</code></pre>

<p>A similar error was reported in <a href="https://stackoverflow.com/questions/3810865/matplotlib-unknown-projection-3d-error">this question (Stackoverflow)</a> but the answers do not help. Some suggestion on how to modify the instruction?
    matplotlib: 3.0.2</p>
