<div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font size="2">Hi to all,</font></div><div><font size="2"><br></font></div><div><font size="2">Unfortunately the settings of Virtual Environment and Environment (which should be renamed to Environment Variables, because it is a little bit confusing with so many environments in the same dialog) doesn't affect the running and the debugging of a script. <br></font></div><div><font size="2">
<font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><font size="2"><span style="font-family:monospace,monospace"></span></font></font></span></font></font></div><div><font size="2"><br></font></div><div><font size="2">On the other hand, just selecting the Virtual Environment in Run Script and Debug Script dialog windows everything is going as expected. Running the following script:</font></div><div><font size="2"><span style="font-family:monospace,monospace">import sys<br>import numpy as np<br>print(sys.version)<br>print(sys.exec_prefix)<br>print(sys.executable)<br>print(sys.path)<br>t = np.linspace(0, 2*np.pi)<br>w = np.sin(t)<br>print(w)</span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><br></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">The output to the Shell form is:</font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><font face="monospace,monospace">Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on Hades, Standard<br>>>> 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)]<br>C:\dev\Miniconda3\envs\scientific<br>C:\dev\Miniconda3\envs\scientific\python.exe<br>['', 'G:\\My Drive\\Python\\python-projects\\Python37_test_project', 'C:\\dev\\Miniconda3\\envs\\eric6\\Lib\\site-packages\\eric6\\DebugClients\\Python', 'C:\\dev\\Miniconda3\\Lib\\site-packages\\omniORBpy-4.2.2\\lib\\python', 'C:\\dev\\Miniconda3\\Lib\\site-packages\\omniORBpy-4.2.2\\lib\\x86_win32', 'C:\\WINDOWS\\System32', 'C:\\dev\\Miniconda3\\envs\\scientific\\python36.zip', 'C:\\dev\\Miniconda3\\envs\\scientific\\DLLs', 'C:\\dev\\Miniconda3\\envs\\scientific\\lib', 'C:\\dev\\Miniconda3\\envs\\scientific', 'C:\\dev\\Miniconda3\\envs\\scientific\\lib\\site-packages']<br>[ 0.00000000e+00 1.27877162e-01 2.53654584e-01 3.75267005e-01<br> 4.90717552e-01 5.98110530e-01 6.95682551e-01 7.81831482e-01<br> 8.55142763e-01 9.14412623e-01 9.58667853e-01 9.87181783e-01<br> 9.99486216e-01 9.95379113e-01 9.74927912e-01 9.38468422e-01<br> 8.86599306e-01 8.20172255e-01 7.40277997e-01 6.48228395e-01<br> 5.45534901e-01 4.33883739e-01 3.15108218e-01 1.91158629e-01<br> 6.40702200e-02 -6.40702200e-02 -1.91158629e-01 -3.15108218e-01<br> -4.33883739e-01 -5.45534901e-01 -6.48228395e-01 -7.40277997e-01<br> -8.20172255e-01 -8.86599306e-01 -9.38468422e-01 -9.74927912e-01<br> -9.95379113e-01 -9.99486216e-01 -9.87181783e-01 -9.58667853e-01<br> -9.14412623e-01 -8.55142763e-01 -7.81831482e-01 -6.95682551e-01<br> -5.98110530e-01 -4.90717552e-01 -3.75267005e-01 -2.53654584e-01<br> -1.27877162e-01 -2.44929360e-16]<br></font></font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><font face="monospace,monospace"><br></font></font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><font face="monospace,monospace"><font face="arial,helvetica,sans-serif">I don't set any Working Directory or Environment (Variables) such as </font></font></font>PATH <font face="arial,helvetica,sans-serif"><font face="monospace,monospace"><font face="arial,helvetica,sans-serif">or </font></font></font>PYTHONPATH<font face="arial,helvetica,sans-serif">. Of course, Alex, and as Detlev said, for special cases somebody should set the aforementioned environment variables (e.g. <font face="monospace,monospace">set PATH=C:\dev\Miniconda3\<font face="arial,helvetica,sans-serif">) </font></font>instead of Working Directory.</font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">
<font size="2"><span style="font-family:monospace,monospace"></span></font></font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><br></font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">Alex, the Anaconda repository has not full upgraded for Python 3.7 and
<font size="2"><span style="font-family:monospace,monospace">numpy<font face="arial,helvetica,sans-serif"> </font></span></font>package
<font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">for Python 3.7</font></span></font></font></span></font>
is not ready yet for installation. I cannot import A</font>naconda numpy<font face="arial,helvetica,sans-serif"> in a Python 3.7
<font size="2"><span style="font-family:monospace,monospace">conda</span></font>
Virtual Environment, in Eric and anywhere else. Also, I have been using also Intel Distribution for Python with NumPy successfully in Eric. Finally, I tested a Conda Virtual Environment with Python 3.7 with <font face="monospace,monospace">numpy</font> installed not with <font face="monospace,monospace">conda</font> (Anaconda repository) but with <font face="monospace,monospace">pip<font face="arial,helvetica,sans-serif"> </font>(</font></font></span>Pypi repository<span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><font face="monospace,monospace">)</font>and everything
<font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">in Eric</font></span></font>
was ok.<br></font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><br></font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">
<font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">Detlev, I don't know if there is a problem or I don't know how to use </font></span></font></font></span></font>the settings in the Debugger Options dialog window, but I expected that every Project should have its Virtual Environment and Python interpreter saved separately. Debugger Options seem to be saved on a Eric IDE level and not on Project level. Also, as I see with my experimentation, the Conda Virtual Environments are probably the same with the <font face="monospace,monospace">virtualenv<font face="arial,helvetica,sans-serif"> ones. It should be nice to integrate the <font face="monospace,monospace">conda<font face="arial,helvetica,sans-serif"> functionality in Eric, but it is not so importan</font></font></font></font>t for the moment. <font face="monospace,monospace">conda<font face="arial,helvetica,sans-serif"> also offers <font face="monospace,monospace">pip <font face="arial,helvetica,sans-serif">functionality with extra features. I use both of them.</font></font></font></font><br></font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><br></font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">Sincerely,</font></span></font></div><div><font size="2"><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">Christos Sevastiadis<br></font></span></font></div></div></div></div>