<p dir="auto">I try to include a common f77 block from legacy code.</p>
<p dir="auto">some calculations in the conversion go wrong.</p>
<p dir="auto">I have in my common block lines</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="      implicit real*8 (a-h,o-z)
      parameter ( nvar  = 3       )
      parameter ( jmz    = 1983 )

      common scmt(3*(jmz+1)), dbuf(nvar*(nvar+1) * (jmz+2))"><pre class="notranslate"><code class="notranslate">      implicit real*8 (a-h,o-z)
      parameter ( nvar  = 3       )
      parameter ( jmz    = 1983 )

      common scmt(3*(jmz+1)), dbuf(nvar*(nvar+1) * (jmz+2))
</code></pre></div>
<p dir="auto">resulting an a comlilation error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/tmp/tmpcpniavle/src.linux-x86_64-3.4/_keplermodule.c:1386:22: error: ânvarâ undeclared here (not in a function)
   {&quot;dbuf&quot;,1,{{5955 * nvar + 5955}},NPY_DOUBLE},"><pre class="notranslate"><code class="notranslate">/tmp/tmpcpniavle/src.linux-x86_64-3.4/_keplermodule.c:1386:22: error: ânvarâ undeclared here (not in a function)
   {"dbuf",1,{{5955 * nvar + 5955}},NPY_DOUBLE},
</code></pre></div>
<p dir="auto">it seems a bad line is generated and f2py does not resolve multiple occurrences (nvar) of the same parameter/variable in an expression?  at least inside sufficiently complex expressions?</p>
<p dir="auto">If I define a parameter with nvar*(nvar+1) and use that new parameter, things work, but maybe if you get a chance to fix this fluke as well, that would be nice.  (or let me me know in what function for crackfortran even to look...)</p>
<p dir="auto">when running the bellow code or any code having import pandas as pd I get the above error.<br>
this is happening in the vs code ide run cod execution<br>
I can run the code as run python file in terminal<br>
for some reason to the output using run code I am getting the above error.</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd

x = list(range(0,100))
pd.DataFrame(x)

print(x)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>

<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-en">range</span>(<span class="pl-c1">0</span>,<span class="pl-c1">100</span>))
<span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">x</span>)

<span class="pl-en">print</span>(<span class="pl-s1">x</span>)</pre></div>
<h3 dir="auto">Error message:</h3>
<p dir="auto">Traceback (most recent call last):<br>
File "c:\Users\user\Documents\Visual Studio 2017\Projects\test1.py", line 7, in <br>
import pandas as pd<br>
File "C:\Users\user\Anaconda3\lib\site-packages\pandas_<em>init</em>_.py", line 17, in <br>
"Unable to import required dependencies:\n" + "\n".join(missing_dependencies)<br>
ImportError: Unable to import required dependencies:<br>
numpy:</p>
<p dir="auto">IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!</p>
<p dir="auto">Importing the numpy c-extensions failed.</p>
<ul dir="auto">
<li>
<p dir="auto">Try uninstalling and reinstalling numpy.</p>
</li>
<li>
<p dir="auto">If you have already done that, then:</p>
<ol dir="auto">
<li>Check that you expected to use Python3.7 from "C:\Users\user\Anaconda3\python.exe",<br>
and that you have no directories in your PATH or PYTHONPATH that can<br>
interfere with the Python and numpy version "1.17.4" you're trying to use.</li>
<li>If (1) looks fine, you can open a new issue at<br>
<a href="https://github.com/numpy/numpy/issues">https://github.com/numpy/numpy/issues</a>.  Please include details on:
<ul dir="auto">
<li>how you installed Python</li>
<li>how you installed numpy</li>
<li>your operating system</li>
<li>whether or not you have multiple versions of Python installed</li>
<li>if you built from source, your compiler versions and ideally a build log</li>
</ul>
</li>
</ol>
</li>
<li>
<p dir="auto">If you're working with a numpy git repository, try <code class="notranslate">git clean -xdf</code><br>
(removes all files not under version control) and rebuild numpy.</p>
</li>
</ul>
<p dir="auto">Note: this error has many possible causes, so please don't comment on<br>
an existing issue about this - open a new one instead.</p>
<p dir="auto">Original error was: DLL load failed: The specified module could not be found.</p>
<h3 dir="auto">Numpy/Python version information:</h3>
<p dir="auto">numpy=1.17.4<br>
python 3.7.4</p>
<p dir="auto">I am using anaconda<br>
I tried to remove and reinstall numpy</p>