Discussion:
[Eric] Support network for eric, conda, and internet connection
Alex Gerhardt-Bourke
2018-09-15 04:22:12 UTC
Permalink
Hi,
I have a few questions regarding eric:

1. Is there any place to discuss working with eric rather than this mailing list? It seems the IRC channel on freenode is dead. Is there a discord server or subreddit or any other place for eric support/discussion?
2. Can eric be used properly with conda virtual environments? I am running python through a conda installation, and have pyqt and qscintilla installed under the conda base environment. With this I can install and run eric. However, when I create a new conda virtual environment, and add this environment to the eric virtual environments list, I cannot import other packages I have installed under the new virtual environment. Under the new virtual environment, when selected through the debugger settings (not sure why it has to be changed here and not just in the virtualenv manager), the python interpreter tries but fails to import installed packages. This is different to when it cannot find the package at all.
3. Do I need to do configure eric so that eric can connect to the internet? For whatever reason, I cannot connect to IRC channels through the IRC client (the connect button is greyed out), nor can I see the list of plugins in the plugin repository. In fact, the plugin repository tells me “Network status: offline”.

Regards,
Alex.
Detlev Offenbach
2018-09-15 09:30:19 UTC
Permalink
Am Samstag, 15. September 2018, 06:22:12 CEST schrieb Alex Gerhardt-Bourke:
> Hi,
> I have a few questions regarding eric:
>
> 1. Is there any place to discuss working with eric rather than this
> mailing list? It seems the IRC channel on freenode is dead. Is there a
> discord server or subreddit or any other place for eric support/discussion?

No, this mailing list is the right place.

> 2. Can eric be used properly with conda virtual environments? I am running
> python through a conda installation, and have pyqt and qscintilla installed
> under the conda base environment. With this I can install and run eric.
> However, when I create a new conda virtual environment, and add this
> environment to the eric virtual environments list, I cannot import other
> packages I have installed under the new virtual environment. Under the new
> virtual environment, when selected through the debugger settings (not sure
> why it has to be changed here and not just in the virtualenv manager), the
> python interpreter tries but fails to import installed packages. This is
> different to when it cannot find the package at all.

I have never tested eric with conda virtual environments. However, it works
fine with virtual environments created with virtualenv or venv and it offers a
virtual env creation tool for these two variants. What is the difference
between conda venv and the standard Python venv?

> 3. Do I need to do
> configure eric so that eric can connect to the internet? For whatever
> reason, I cannot connect to IRC channels through the IRC client (the
> connect button is greyed out), nor can I see the list of plugins in the
> plugin repository. In fact, the plugin repository tells me “Network status:
> offline”.

This indication comes from the operating system through Qt. However, you can
disable checking the online status on the Network configuration page.

>
Regards,
Detlev
--
Detlev Offenbach
***@die-offenbachs.de
Christos Sevastiadis
2018-09-15 13:25:05 UTC
Permalink
Dear Alex,

I use Conda either but in a different way. I created an exclusive
environment for the Eric installation, named 'eric6', installing in it
QScintilla and some other packages needed for its special functionalities.
Also, some other packages especially for eric should be installed in the
base environment. I separated my Eric installation because of PyQt
conflicts with the Spyder IDE. My main working packages are installed in
the base environment, which I add it and set it as 'Global' in the Eric
'Manage Virtual Environments' dialog window. I can add any new Conda
created environment in the same dialog window, but not as global virtual
environments (I don't know if it has any effect, anyway). I selected the
base Conda environment in the 'Python3 Virtual Environment' of
Preferences.Debuger.Python3.(Configure Python3 Debugger). I select any
other Conda environment as 'Virtual Environment' in 'Run Script' and 'Debug
Script" dialog windows and the scripts are executed normally, importing
their modules. I don't know if you a have problem with a specific module.

P.S. If you are interested I have some Windows cmd scripts installing
Miniconda and Eric, with Eric's dependencies, almost automatically.

P.S. to Detlev: It should be convenient if the of the default running
environment was saved in the project. That means there is a default running
environment for all new projects, but it can be changed and saved on each
project.

Christos Sevastiadis
Detlev Offenbach
2018-09-15 13:41:58 UTC
Permalink
Am Samstag, 15. September 2018, 15:25:05 CEST schrieb Christos Sevastiadis:

..

> P.S. to Detlev: It should be convenient if the of the default running
> environment was saved in the project. That means there is a default running
> environment for all new projects, but it can be changed and saved on each
> project.

Virtual environments can be different on different computers/operating
systems. Therefore I am not including this in the project data, because that
should be platform/installation neutral. However, one can configure the
debugger settings specifically for a project through the Project menu
(Project->Debugger). Loading and saving of the project debugger settings can
be configured on the Project->Project configuration page.

Detlev
--
Detlev Offenbach
***@die-offenbachs.de
Christos Sevastiadis
2018-09-15 15:16:07 UTC
Permalink
On Sat, 15 Sep 2018 at 17:07, Detlev Offenbach <***@die-offenbachs.de>
wrote:

>
> Am Samstag, 15. September 2018, 15:25:05 CEST schrieb Christos Sevastiadis:
>
> ..
>
> > P.S. to Detlev: It should be convenient if the of the default running
> > environment was saved in the project. That means there is a default
> running
> > environment for all new projects, but it can be changed and saved on each
> > project.
>
> Virtual environments can be different on different computers/operating
> systems. Therefore I am not including this in the project data, because
> that
> should be platform/installation neutral. However, one can configure the
> debugger settings specifically for a project through the Project menu
> (Project->Debugger). Loading and saving of the project debugger settings
> can
> be configured on the Project->Project configuration page.
>
> Detlev
> --
> Detlev Offenbach
> ***@die-offenbachs.de
>
>


I didn't notice the Debug options in the project Menu, as I was expecting
it somewhere in or close to the Project options in the same menu.
Because I started to use Python with the Anaconda distribution, which is
popular for scientific applications, from the beginning I was involved with
the problems of Conda environments and Eric. One way or another I solved
them, with no need the Conda system to be integrated into Eric. I hope Alex
will make it either.

Christos.
Alex Gerhardt-Bourke
2018-09-16 06:14:12 UTC
Permalink
Hi All,

Thankyou for your responses.

Toggling the Dynamic Online Status Determination meant I am now able to retrieve the list of plugins. It did not solve the issue of being able to connect to IRC servers – not a huge issue but would be nice to know what is causing this.

With regards to Conda environments – thankyou Christos for your useful contributions. Installing eric6 under its own virtual environment is a great idea as it means I can keep pyqt5 and qscintilla and other packages used by eric in compatible versions with eric.
The way you have described setting conda virtual environments works a charm – it seems you can only set an environment as a “global environment” if you have not also set the directory path name. I also do not know what the effect of this is.

I have now realized, after testing with other modules, that it is the numpy module in particular that is making life difficult. Here is my setup:
Miniconda installed, base environment has no extra modules installed
eric6 environment has pyqt5, qscintilla installed underneath it. Eric has been installed and is running under this environment
testEric environment has numpy installed. Numpy successfully imports when running through the anaconda prompt with the testEric environment activated.

Now, if I try to import numpy in a script and run through eric, where I choose testEric as the virtual environment, I get an import error. This is the same import error I get if I manually run the testEric python interpreter and try to import numpy. So I assume conda is doing something else when I run its activation script. I have tried changing the virtual environment configuration in eric, in particular the “global environment” toggle as mentioned before, as well as changing the <default> global environment to both the conda base interpreter, and the eric6 environment interpreter. Clearly none of these settings also change whatever conda is doing.

Cristos – do you work with numpy and do you work with numpy in eric? Perhaps this is one of your “working” packages you have installed under the base environment. I assume this issue won’t exist if running through the base environment, but this is clearly not a solution if one wants to work with virtual environments in their intended sense.

Thankyou all again for your input,
Regards,
Alex.


From: Christos Sevastiadis<mailto:***@auth.gr>
Sent: Saturday, September 15, 2018 10:17 PM
Subject: Re: [Eric] Support network for eric, conda, and internet connection


On Sat, 15 Sep 2018 at 17:07, Detlev Offenbach <***@die-offenbachs.de<mailto:***@die-offenbachs.de>> wrote:

Am Samstag, 15. September 2018, 15:25:05 CEST schrieb Christos Sevastiadis:

..

> P.S. to Detlev: It should be convenient if the of the default running
> environment was saved in the project. That means there is a default running
> environment for all new projects, but it can be changed and saved on each
> project.

Virtual environments can be different on different computers/operating
systems. Therefore I am not including this in the project data, because that
should be platform/installation neutral. However, one can configure the
debugger settings specifically for a project through the Project menu
(Project->Debugger). Loading and saving of the project debugger settings can
be configured on the Project->Project configuration page.

Detlev
--
Detlev Offenbach
***@die-offenbachs.de<mailto:***@die-offenbachs.de>



I didn't notice the Debug options in the project Menu, as I was expecting it somewhere in or close to the Project options in the same menu.
Because I started to use Python with the Anaconda distribution, which is popular for scientific applications, from the beginning I was involved with the problems of Conda environments and Eric. One way or another I solved them, with no need the Conda system to be integrated into Eric. I hope Alex will make it either.

Christos.
Alex Gerhardt-Bourke
2018-09-16 07:38:14 UTC
Permalink
I have found that, under the setup I described in my last email, it is necessary to have
\AppData\Local\conda\conda\envs\testEric\Library\bin;
Included in PATH in order to import numpy successfully.

Setting this path as the “working directory” in the “Run Script” prompt seems to solve the issue.
What is the “working directory” setting supposed to control, and would I expect other consequences to doing this? Is there a way to tie this working directory to a particular virtual environment?

Regards,
Alex.

________________________________
From: Eric <eric-***@riverbankcomputing.com> on behalf of Alex Gerhardt-Bourke <***@hotmail.com>
Sent: Sunday, September 16, 2018 1:14:12 PM
To: Christos Sevastiadis; ***@die-offenbachs.de
Cc: ***@riverbankcomputing.com
Subject: Re: [Eric] Support network for eric, conda, and internet connection

Hi All,

Thankyou for your responses.

Toggling the Dynamic Online Status Determination meant I am now able to retrieve the list of plugins. It did not solve the issue of being able to connect to IRC servers – not a huge issue but would be nice to know what is causing this.

With regards to Conda environments – thankyou Christos for your useful contributions. Installing eric6 under its own virtual environment is a great idea as it means I can keep pyqt5 and qscintilla and other packages used by eric in compatible versions with eric.
The way you have described setting conda virtual environments works a charm – it seems you can only set an environment as a “global environment” if you have not also set the directory path name. I also do not know what the effect of this is.

I have now realized, after testing with other modules, that it is the numpy module in particular that is making life difficult. Here is my setup:
Miniconda installed, base environment has no extra modules installed
eric6 environment has pyqt5, qscintilla installed underneath it. Eric has been installed and is running under this environment
testEric environment has numpy installed. Numpy successfully imports when running through the anaconda prompt with the testEric environment activated.

Now, if I try to import numpy in a script and run through eric, where I choose testEric as the virtual environment, I get an import error. This is the same import error I get if I manually run the testEric python interpreter and try to import numpy. So I assume conda is doing something else when I run its activation script. I have tried changing the virtual environment configuration in eric, in particular the “global environment” toggle as mentioned before, as well as changing the <default> global environment to both the conda base interpreter, and the eric6 environment interpreter. Clearly none of these settings also change whatever conda is doing.

Cristos – do you work with numpy and do you work with numpy in eric? Perhaps this is one of your “working” packages you have installed under the base environment. I assume this issue won’t exist if running through the base environment, but this is clearly not a solution if one wants to work with virtual environments in their intended sense.

Thankyou all again for your input,
Regards,
Alex.


From: Christos Sevastiadis<mailto:***@auth.gr>
Sent: Saturday, September 15, 2018 10:17 PM
Subject: Re: [Eric] Support network for eric, conda, and internet connection


On Sat, 15 Sep 2018 at 17:07, Detlev Offenbach <***@die-offenbachs.de<mailto:***@die-offenbachs.de>> wrote:

Am Samstag, 15. September 2018, 15:25:05 CEST schrieb Christos Sevastiadis:

..

> P.S. to Detlev: It should be convenient if the of the default running
> environment was saved in the project. That means there is a default running
> environment for all new projects, but it can be changed and saved on each
> project.

Virtual environments can be different on different computers/operating
systems. Therefore I am not including this in the project data, because that
should be platform/installation neutral. However, one can configure the
debugger settings specifically for a project through the Project menu
(Project->Debugger). Loading and saving of the project debugger settings can
be configured on the Project->Project configuration page.

Detlev
--
Detlev Offenbach
***@die-offenbachs.de<mailto:***@die-offenbachs.de>



I didn't notice the Debug options in the project Menu, as I was expecting it somewhere in or close to the Project options in the same menu.
Because I started to use Python with the Anaconda distribution, which is popular for scientific applications, from the beginning I was involved with the problems of Conda environments and Eric. One way or another I solved them, with no need the Conda system to be integrated into Eric. I hope Alex will make it either.

Christos.
Detlev Offenbach
2018-09-16 09:48:02 UTC
Permalink
The working directory entry does what it says. The debugger process does a
kind of 'cd' into this directory and is started thereafter.

Another possibility should be to set the PYTHONPATH environment variable. This
could be set in the named dialog as well as permanently in the project
debugger properties (Project menu -> Debugger submenu).

I am open for suggestions for what stuff should be part of a virtual
environment definition and how it should be used.

Detlev

Am Sonntag, 16. September 2018, 09:38:14 CEST schrieb Alex Gerhardt-Bourke:
> I have found that, under the setup I described in my last email, it is
> necessary to have \AppData\Local\conda\conda\envs\testEric\Library\bin;
> Included in PATH in order to import numpy successfully.
>
> Setting this path as the “working directory” in the “Run Script” prompt
> seems to solve the issue. What is the “working directory” setting supposed
> to control, and would I expect other consequences to doing this? Is there a
> way to tie this working directory to a particular virtual environment?
>
> Regards,
> Alex.
>
> ________________________________
> From: Eric <eric-***@riverbankcomputing.com> on behalf of Alex
> Gerhardt-Bourke <***@hotmail.com> Sent: Sunday, September 16, 2018
> 1:14:12 PM
> To: Christos Sevastiadis; ***@die-offenbachs.de
> Cc: ***@riverbankcomputing.com
> Subject: Re: [Eric] Support network for eric, conda, and internet connection
>
> Hi All,
>
> Thankyou for your responses.
>
> Toggling the Dynamic Online Status Determination meant I am now able to
> retrieve the list of plugins. It did not solve the issue of being able to
> connect to IRC servers – not a huge issue but would be nice to know what is
> causing this.
>
> With regards to Conda environments – thankyou Christos for your useful
> contributions. Installing eric6 under its own virtual environment is a
> great idea as it means I can keep pyqt5 and qscintilla and other packages
> used by eric in compatible versions with eric. The way you have described
> setting conda virtual environments works a charm – it seems you can only
> set an environment as a “global environment” if you have not also set the
> directory path name. I also do not know what the effect of this is.
>
> I have now realized, after testing with other modules, that it is the numpy
> module in particular that is making life difficult. Here is my setup:
> Miniconda installed, base environment has no extra modules installed eric6
> environment has pyqt5, qscintilla installed underneath it. Eric has been
> installed and is running under this environment testEric environment has
> numpy installed. Numpy successfully imports when running through the
> anaconda prompt with the testEric environment activated.
>
> Now, if I try to import numpy in a script and run through eric, where I
> choose testEric as the virtual environment, I get an import error. This is
> the same import error I get if I manually run the testEric python
> interpreter and try to import numpy. So I assume conda is doing something
> else when I run its activation script. I have tried changing the virtual
> environment configuration in eric, in particular the “global environment”
> toggle as mentioned before, as well as changing the <default> global
> environment to both the conda base interpreter, and the eric6 environment
> interpreter. Clearly none of these settings also change whatever conda is
> doing.
>
> Cristos – do you work with numpy and do you work with numpy in eric? Perhaps
> this is one of your “working” packages you have installed under the base
> environment. I assume this issue won’t exist if running through the base
> environment, but this is clearly not a solution if one wants to work with
> virtual environments in their intended sense.
>
> Thankyou all again for your input,
> Regards,
> Alex.
>
>
> From: Christos Sevastiadis<mailto:***@auth.gr>
> Sent: Saturday, September 15, 2018 10:17 PM
> Subject: Re: [Eric] Support network for eric, conda, and internet connection
>
>
> On Sat, 15 Sep 2018 at 17:07, Detlev Offenbach
> <***@die-offenbachs.de<mailto:***@die-offenbachs.de>> wrote:
>
> Am Samstag, 15. September 2018, 15:25:05 CEST schrieb Christos Sevastiadis:
>
> ..
>
> > P.S. to Detlev: It should be convenient if the of the default running
> > environment was saved in the project. That means there is a default
> > running
> > environment for all new projects, but it can be changed and saved on each
> > project.
>
> Virtual environments can be different on different computers/operating
> systems. Therefore I am not including this in the project data, because that
> should be platform/installation neutral. However, one can configure the
> debugger settings specifically for a project through the Project menu
> (Project->Debugger). Loading and saving of the project debugger settings
> can be configured on the Project->Project configuration page.
>
> Detlev
> --
> Detlev Offenbach
> ***@die-offenbachs.de<mailto:***@die-offenbachs.de>
>
>
>
> I didn't notice the Debug options in the project Menu, as I was expecting it
> somewhere in or close to the Project options in the same menu. Because I
> started to use Python with the Anaconda distribution, which is popular for
> scientific applications, from the beginning I was involved with the
> problems of Conda environments and Eric. One way or another I solved them,
> with no need the Conda system to be integrated into Eric. I hope Alex will
> make it either.
>
> Christos.

--
Detlev Offenbach
***@die-offenbachs.de
Alex Gerhardt-Bourke
2018-09-16 11:23:14 UTC
Permalink
I don’t see a PYTHONPATH option in either of those two places.



I will try eric more and get back to you on what I think should be part of the virtual environment definition.



________________________________
From: Detlev Offenbach <***@die-offenbachs.de>
Sent: Sunday, September 16, 2018 4:48:02 PM
To: ***@riverbankcomputing.com
Cc: Alex Gerhardt-Bourke; Christos Sevastiadis
Subject: Re: [Eric] Support network for eric, conda, and internet connection

The working directory entry does what it says. The debugger process does a
kind of 'cd' into this directory and is started thereafter.

Another possibility should be to set the PYTHONPATH environment variable. This
could be set in the named dialog as well as permanently in the project
debugger properties (Project menu -> Debugger submenu).

I am open for suggestions for what stuff should be part of a virtual
environment definition and how it should be used.

Detlev

Am Sonntag, 16. September 2018, 09:38:14 CEST schrieb Alex Gerhardt-Bourke:
> I have found that, under the setup I described in my last email, it is
> necessary to have \AppData\Local\conda\conda\envs\testEric\Library\bin;
> Included in PATH in order to import numpy successfully.
>
> Setting this path as the “working directory” in the “Run Script” prompt
> seems to solve the issue. What is the “working directory” setting supposed
> to control, and would I expect other consequences to doing this? Is there a
> way to tie this working directory to a particular virtual environment?
>
> Regards,
> Alex.
>
> ________________________________
> From: Eric <eric-***@riverbankcomputing.com> on behalf of Alex
> Gerhardt-Bourke <***@hotmail.com> Sent: Sunday, September 16, 2018
> 1:14:12 PM
> To: Christos Sevastiadis; ***@die-offenbachs.de
> Cc: ***@riverbankcomputing.com
> Subject: Re: [Eric] Support network for eric, conda, and internet connection
>
> Hi All,
>
> Thankyou for your responses.
>
> Toggling the Dynamic Online Status Determination meant I am now able to
> retrieve the list of plugins. It did not solve the issue of being able to
> connect to IRC servers – not a huge issue but would be nice to know what is
> causing this.
>
> With regards to Conda environments – thankyou Christos for your useful
> contributions. Installing eric6 under its own virtual environment is a
> great idea as it means I can keep pyqt5 and qscintilla and other packages
> used by eric in compatible versions with eric. The way you have described
> setting conda virtual environments works a charm – it seems you can only
> set an environment as a “global environment” if you have not also set the
> directory path name. I also do not know what the effect of this is.
>
> I have now realized, after testing with other modules, that it is the numpy
> module in particular that is making life difficult. Here is my setup:
> Miniconda installed, base environment has no extra modules installed eric6
> environment has pyqt5, qscintilla installed underneath it. Eric has been
> installed and is running under this environment testEric environment has
> numpy installed. Numpy successfully imports when running through the
> anaconda prompt with the testEric environment activated.
>
> Now, if I try to import numpy in a script and run through eric, where I
> choose testEric as the virtual environment, I get an import error. This is
> the same import error I get if I manually run the testEric python
> interpreter and try to import numpy. So I assume conda is doing something
> else when I run its activation script. I have tried changing the virtual
> environment configuration in eric, in particular the “global environment”
> toggle as mentioned before, as well as changing the <default> global
> environment to both the conda base interpreter, and the eric6 environment
> interpreter. Clearly none of these settings also change whatever conda is
> doing.
>
> Cristos – do you work with numpy and do you work with numpy in eric? Perhaps
> this is one of your “working” packages you have installed under the base
> environment. I assume this issue won’t exist if running through the base
> environment, but this is clearly not a solution if one wants to work with
> virtual environments in their intended sense.
>
> Thankyou all again for your input,
> Regards,
> Alex.
>
>
> From: Christos Sevastiadis<mailto:***@auth.gr>
> Sent: Saturday, September 15, 2018 10:17 PM
> Subject: Re: [Eric] Support network for eric, conda, and internet connection
>
>
> On Sat, 15 Sep 2018 at 17:07, Detlev Offenbach
> <***@die-offenbachs.de<mailto:***@die-offenbachs.de>> wrote:
>
> Am Samstag, 15. September 2018, 15:25:05 CEST schrieb Christos Sevastiadis:
>
> ..
>
> > P.S. to Detlev: It should be convenient if the of the default running
> > environment was saved in the project. That means there is a default
> > running
> > environment for all new projects, but it can be changed and saved on each
> > project.
>
> Virtual environments can be different on different computers/operating
> systems. Therefore I am not including this in the project data, because that
> should be platform/installation neutral. However, one can configure the
> debugger settings specifically for a project through the Project menu
> (Project->Debugger). Loading and saving of the project debugger settings
> can be configured on the Project->Project configuration page.
>
> Detlev
> --
> Detlev Offenbach
> ***@die-offenbachs.de<mailto:***@die-offenbachs.de>
>
>
>
> I didn't notice the Debug options in the project Menu, as I was expecting it
> somewhere in or close to the Project options in the same menu. Because I
> started to use Python with the Anaconda distribution, which is popular for
> scientific applications, from the beginning I was involved with the
> problems of Conda environments and Eric. One way or another I solved them,
> with no need the Conda system to be integrated into Eric. I hope Alex will
> make it either.
>
> Christos.

--
Detlev Offenbach
***@die-offenbachs.de
Detlev Offenbach
2018-09-16 12:05:14 UTC
Permalink
PYTHONPATH can be set as an environment variable in the respective line of the
"Run Script" dialog or the environment line of the project debugger properties
dialog.

Am Sonntag, 16. September 2018, 13:23:14 CEST schrieb Alex Gerhardt-Bourke:
> I don’t see a PYTHONPATH option in either of those two places.
>
>
>
> I will try eric more and get back to you on what I think should be part of
> the virtual environment definition.
>
>
>
> ________________________________
> From: Detlev Offenbach <***@die-offenbachs.de>
> Sent: Sunday, September 16, 2018 4:48:02 PM
> To: ***@riverbankcomputing.com
> Cc: Alex Gerhardt-Bourke; Christos Sevastiadis
> Subject: Re: [Eric] Support network for eric, conda, and internet connection
>
> The working directory entry does what it says. The debugger process does a
> kind of 'cd' into this directory and is started thereafter.
>
> Another possibility should be to set the PYTHONPATH environment variable.
> This could be set in the named dialog as well as permanently in the project
> debugger properties (Project menu -> Debugger submenu).
>
> I am open for suggestions for what stuff should be part of a virtual
> environment definition and how it should be used.
>
> Detlev
>
> Am Sonntag, 16. September 2018, 09:38:14 CEST schrieb Alex Gerhardt-Bourke:
> > I have found that, under the setup I described in my last email, it is
> > necessary to have \AppData\Local\conda\conda\envs\testEric\Library\bin;
> > Included in PATH in order to import numpy successfully.
> >
> > Setting this path as the “working directory” in the “Run Script” prompt
> > seems to solve the issue. What is the “working directory” setting supposed
> > to control, and would I expect other consequences to doing this? Is there
> > a
> > way to tie this working directory to a particular virtual environment?
> >
> > Regards,
> > Alex.
> >
> > ________________________________
> > From: Eric <eric-***@riverbankcomputing.com> on behalf of Alex
> > Gerhardt-Bourke <***@hotmail.com> Sent: Sunday, September 16, 2018
> > 1:14:12 PM
> > To: Christos Sevastiadis; ***@die-offenbachs.de
> > Cc: ***@riverbankcomputing.com
> > Subject: Re: [Eric] Support network for eric, conda, and internet
> > connection
> >
> > Hi All,
> >
> > Thankyou for your responses.
> >
> > Toggling the Dynamic Online Status Determination meant I am now able to
> > retrieve the list of plugins. It did not solve the issue of being able to
> > connect to IRC servers – not a huge issue but would be nice to know what
> > is
> > causing this.
> >
> > With regards to Conda environments – thankyou Christos for your useful
> > contributions. Installing eric6 under its own virtual environment is a
> > great idea as it means I can keep pyqt5 and qscintilla and other packages
> > used by eric in compatible versions with eric. The way you have described
> > setting conda virtual environments works a charm – it seems you can only
> > set an environment as a “global environment” if you have not also set the
> > directory path name. I also do not know what the effect of this is.
> >
> > I have now realized, after testing with other modules, that it is the
> > numpy
> > module in particular that is making life difficult. Here is my setup:
> > Miniconda installed, base environment has no extra modules installed eric6
> > environment has pyqt5, qscintilla installed underneath it. Eric has been
> > installed and is running under this environment testEric environment has
> > numpy installed. Numpy successfully imports when running through the
> > anaconda prompt with the testEric environment activated.
> >
> > Now, if I try to import numpy in a script and run through eric, where I
> > choose testEric as the virtual environment, I get an import error. This is
> > the same import error I get if I manually run the testEric python
> > interpreter and try to import numpy. So I assume conda is doing something
> > else when I run its activation script. I have tried changing the virtual
> > environment configuration in eric, in particular the “global environment”
> > toggle as mentioned before, as well as changing the <default> global
> > environment to both the conda base interpreter, and the eric6 environment
> > interpreter. Clearly none of these settings also change whatever conda is
> > doing.
> >
> > Cristos – do you work with numpy and do you work with numpy in eric?
> > Perhaps this is one of your “working” packages you have installed under
> > the base environment. I assume this issue won’t exist if running through
> > the base environment, but this is clearly not a solution if one wants to
> > work with virtual environments in their intended sense.
> >
> > Thankyou all again for your input,
> > Regards,
> > Alex.
> >
> >
> > From: Christos Sevastiadis<mailto:***@auth.gr>
> > Sent: Saturday, September 15, 2018 10:17 PM
> > Subject: Re: [Eric] Support network for eric, conda, and internet
> > connection
> >
> >
> > On Sat, 15 Sep 2018 at 17:07, Detlev Offenbach
> > <***@die-offenbachs.de<mailto:***@die-offenbachs.de>> wrote:
> >
> > Am Samstag, 15. September 2018, 15:25:05 CEST schrieb Christos
> > Sevastiadis:
> >
> > ..
> >
> > > P.S. to Detlev: It should be convenient if the of the default running
> > > environment was saved in the project. That means there is a default
> > > running
> > > environment for all new projects, but it can be changed and saved on
> > > each
> > > project.
> >
> > Virtual environments can be different on different computers/operating
> > systems. Therefore I am not including this in the project data, because
> > that should be platform/installation neutral. However, one can configure
> > the debugger settings specifically for a project through the Project menu
> > (Project->Debugger). Loading and saving of the project debugger settings
> > can be configured on the Project->Project configuration page.
> >
> > Detlev
> > --
> > Detlev Offenbach
> > ***@die-offenbachs.de<mailto:***@die-offenbachs.de>
> >
> >
> >
> > I didn't notice the Debug options in the project Menu, as I was expecting
> > it somewhere in or close to the Project options in the same menu. Because
> > I started to use Python with the Anaconda distribution, which is popular
> > for scientific applications, from the beginning I was involved with the
> > problems of Conda environments and Eric. One way or another I solved
> > them, with no need the Conda system to be integrated into Eric. I hope
> > Alex will make it either.
> >
> > Christos.
>
> --
> Detlev Offenbach
> ***@die-offenbachs.de

--
Detlev Offenbach
***@die-offenbachs.de
Christos Sevastiadis
2018-09-16 15:04:58 UTC
Permalink
Hi to all,

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.

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:
import sys
import numpy as np
print(sys.version)
print(sys.exec_prefix)
print(sys.executable)
print(sys.path)
t = np.linspace(0, 2*np.pi)
w = np.sin(t)
print(w)

The output to the Shell form is:
Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900
64 bit (AMD64)] on Hades, Standard
>>> 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64
bit (AMD64)]
C:\dev\Miniconda3\envs\scientific
C:\dev\Miniconda3\envs\scientific\python.exe
['', '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']
[ 0.00000000e+00 1.27877162e-01 2.53654584e-01 3.75267005e-01
4.90717552e-01 5.98110530e-01 6.95682551e-01 7.81831482e-01
8.55142763e-01 9.14412623e-01 9.58667853e-01 9.87181783e-01
9.99486216e-01 9.95379113e-01 9.74927912e-01 9.38468422e-01
8.86599306e-01 8.20172255e-01 7.40277997e-01 6.48228395e-01
5.45534901e-01 4.33883739e-01 3.15108218e-01 1.91158629e-01
6.40702200e-02 -6.40702200e-02 -1.91158629e-01 -3.15108218e-01
-4.33883739e-01 -5.45534901e-01 -6.48228395e-01 -7.40277997e-01
-8.20172255e-01 -8.86599306e-01 -9.38468422e-01 -9.74927912e-01
-9.95379113e-01 -9.99486216e-01 -9.87181783e-01 -9.58667853e-01
-9.14412623e-01 -8.55142763e-01 -7.81831482e-01 -6.95682551e-01
-5.98110530e-01 -4.90717552e-01 -3.75267005e-01 -2.53654584e-01
-1.27877162e-01 -2.44929360e-16]

I don't set any Working Directory or Environment (Variables) such as PATH or
PYTHONPATH. Of course, Alex, and as Detlev said, for special cases somebody
should set the aforementioned environment variables (e.g. set
PATH=C:\dev\Miniconda3\) instead of Working Directory.

Alex, the Anaconda repository has not full upgraded for Python 3.7 and
numpy package
for Python 3.7 is not ready yet for installation. I cannot import Anaconda
numpy in a Python 3.7 conda 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 numpy installed not with conda (Anaconda repository) but
with pip (Pypi repository)and everything in Eric was ok.

Detlev, I don't know if there is a problem or I don't know how to use 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 virtualenv ones. It should be
nice to integrate the conda functionality in Eric, but it is not so important
for the moment. conda also offers pip functionality with extra features. I
use both of them.

Sincerely,
Christos Sevastiadis
Detlev Offenbach
2018-09-16 15:16:52 UTC
Permalink
Am Sonntag, 16. September 2018, 17:04:58 CEST schrieb Christos Sevastiadis:
> Hi to all,
>
> 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.

Haven't used this functionality for ages. If it is not used by many people,
maybe it should go away?

>
> 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:
> import sys
> import numpy as np
> print(sys.version)
> print(sys.exec_prefix)
> print(sys.executable)
> print(sys.path)
> t = np.linspace(0, 2*np.pi)
> w = np.sin(t)
> print(w)
>
> The output to the Shell form is:
> Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900
> 64 bit (AMD64)] on Hades, Standard
>
> >>> 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64
>
> bit (AMD64)]
> C:\dev\Miniconda3\envs\scientific
> C:\dev\Miniconda3\envs\scientific\python.exe
> ['', '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']
> [ 0.00000000e+00 1.27877162e-01 2.53654584e-01 3.75267005e-01
> 4.90717552e-01 5.98110530e-01 6.95682551e-01 7.81831482e-01
> 8.55142763e-01 9.14412623e-01 9.58667853e-01 9.87181783e-01
> 9.99486216e-01 9.95379113e-01 9.74927912e-01 9.38468422e-01
> 8.86599306e-01 8.20172255e-01 7.40277997e-01 6.48228395e-01
> 5.45534901e-01 4.33883739e-01 3.15108218e-01 1.91158629e-01
> 6.40702200e-02 -6.40702200e-02 -1.91158629e-01 -3.15108218e-01
> -4.33883739e-01 -5.45534901e-01 -6.48228395e-01 -7.40277997e-01
> -8.20172255e-01 -8.86599306e-01 -9.38468422e-01 -9.74927912e-01
> -9.95379113e-01 -9.99486216e-01 -9.87181783e-01 -9.58667853e-01
> -9.14412623e-01 -8.55142763e-01 -7.81831482e-01 -6.95682551e-01
> -5.98110530e-01 -4.90717552e-01 -3.75267005e-01 -2.53654584e-01
> -1.27877162e-01 -2.44929360e-16]
>
> I don't set any Working Directory or Environment (Variables) such as PATH
> or PYTHONPATH. Of course, Alex, and as Detlev said, for special cases
> somebody should set the aforementioned environment variables (e.g. set
> PATH=C:\dev\Miniconda3\) instead of Working Directory.
>
> Alex, the Anaconda repository has not full upgraded for Python 3.7 and
> numpy package
> for Python 3.7 is not ready yet for installation. I cannot import Anaconda
> numpy in a Python 3.7 conda 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 numpy installed not with conda (Anaconda repository) but
> with pip (Pypi repository)and everything in Eric was ok.
>
> Detlev, I don't know if there is a problem or I don't know how to use 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 virtualenv ones. It should be
> nice to integrate the conda functionality in Eric, but it is not so
> important for the moment. conda also offers pip functionality with extra
> features. I use both of them.

Does conda have its own command to create virtual environments? The pip
functionality can be accessed through eric. However, the path to pip must be
configured via the Configuration Dialog, Python Package Manager page first.
All pip related functions supported by eric can be accessed via Extras->Python
Package Management submenu. Please note, that this has only been tested with
the standard pip. If conda is special, it might behave unexpectedly. I don't
have a conda installation over here.

Detlev
--
Detlev Offenbach
***@die-offenbachs.de
Christos Sevastiadis
2018-09-16 15:47:03 UTC
Permalink
Detlev,

conda combines pip and virtualenv offering extra package version checking
for automatic upgrading and degrading. I think it is better than the
official pip and virtualenv but the package installation cooperates only
with Anaconda repository and not with PyPI. Anaconda In the installed
Anaconda distribution for Python, both conda and pip can be used. I never
managed Packages and Virtual Environments of any kind through Eric or any
other IDE for Python. I always manage them through cmd prompt. But in Eric
somebody should be able to choose the existing Virtual Environments and
their python interpreters, and, of course, change the environment variables
etc. for running and debugging the Python scripts. A workflow can have
different projects running in different virtual environments with specific
environment variables settings. So, it is important in each Eric project to
be saved these setting.

Christos
Alex Gerhardt-Bourke
2018-09-16 15:42:42 UTC
Permalink
Fonda environments are a whole new can of worms. Conda has its own package management and manages more than just python packages. Strangely enough within conda environments you can even have pip virtual environments - but this is certainly not the intended use case.

Activating environments in conda is basically just updating PATH and PYTHONPATH.

To make matters worse, conda environments can exist without their own python interpreter. I am yet to see an IDE that can actually work with true conda environments rather than just relying on different interpreters existing. More to the point, conda has its own scripts for installing and compiling packages, which can be used in conjunction with pip. Again, I don't know of any IDEs that actually implement this functionality, rather they simply let you use conda environments you have created elsewhere. This is generally more than enough.

On 16 Sep 2018 10:16 pm, Detlev Offenbach <***@die-offenbachs.de> wrote:

Am Sonntag, 16. September 2018, 17:04:58 CEST schrieb Christos Sevastiadis:
> Hi to all,
>
> 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.

Haven't used this functionality for ages. If it is not used by many people,
maybe it should go away?

>
> 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:
> import sys
> import numpy as np
> print(sys.version)
> print(sys.exec_prefix)
> print(sys.executable)
> print(sys.path)
> t = np.linspace(0, 2*np.pi)
> w = np.sin(t)
> print(w)
>
> The output to the Shell form is:
> Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900
> 64 bit (AMD64)] on Hades, Standard
>
> >>> 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64
>
> bit (AMD64)]
> C:\dev\Miniconda3\envs\scientific
> C:\dev\Miniconda3\envs\scientific\python.exe
> ['', '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']
> [ 0.00000000e+00 1.27877162e-01 2.53654584e-01 3.75267005e-01
> 4.90717552e-01 5.98110530e-01 6.95682551e-01 7.81831482e-01
> 8.55142763e-01 9.14412623e-01 9.58667853e-01 9.87181783e-01
> 9.99486216e-01 9.95379113e-01 9.74927912e-01 9.38468422e-01
> 8.86599306e-01 8.20172255e-01 7.40277997e-01 6.48228395e-01
> 5.45534901e-01 4.33883739e-01 3.15108218e-01 1.91158629e-01
> 6.40702200e-02 -6.40702200e-02 -1.91158629e-01 -3.15108218e-01
> -4.33883739e-01 -5.45534901e-01 -6.48228395e-01 -7.40277997e-01
> -8.20172255e-01 -8.86599306e-01 -9.38468422e-01 -9.74927912e-01
> -9.95379113e-01 -9.99486216e-01 -9.87181783e-01 -9.58667853e-01
> -9.14412623e-01 -8.55142763e-01 -7.81831482e-01 -6.95682551e-01
> -5.98110530e-01 -4.90717552e-01 -3.75267005e-01 -2.53654584e-01
> -1.27877162e-01 -2.44929360e-16]
>
> I don't set any Working Directory or Environment (Variables) such as PATH
> or PYTHONPATH. Of course, Alex, and as Detlev said, for special cases
> somebody should set the aforementioned environment variables (e.g. set
> PATH=C:\dev\Miniconda3\) instead of Working Directory.
>
> Alex, the Anaconda repository has not full upgraded for Python 3.7 and
> numpy package
> for Python 3.7 is not ready yet for installation. I cannot import Anaconda
> numpy in a Python 3.7 conda 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 numpy installed not with conda (Anaconda repository) but
> with pip (Pypi repository)and everything in Eric was ok.
>
> Detlev, I don't know if there is a problem or I don't know how to use 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 virtualenv ones. It should be
> nice to integrate the conda functionality in Eric, but it is not so
> important for the moment. conda also offers pip functionality with extra
> features. I use both of them.

Does conda have its own command to create virtual environments? The pip
functionality can be accessed through eric. However, the path to pip must be
configured via the Configuration Dialog, Python Package Manager page first.
All pip related functions supported by eric can be accessed via Extras->Python
Package Management submenu. Please note, that this has only been tested with
the standard pip. If conda is special, it might behave unexpectedly. I don't
have a conda installation over here.

Detlev
--
Detlev Offenbach
***@die-offenbachs.de
Christos Sevastiadis
2018-09-16 16:31:57 UTC
Permalink
Alex,

I think that Conda Virtual Environments are changing only the PATH
environment variable through the activate *envname* command in cmd prompt.
I don't know if virtualenv does the same.

The only IDEs for Python I found which integrates, among many other, the
conda functionalities for package and virtual environments management is
PyCharm . The Eclipse/PyDev (LiClipse) IDE is integrating only the conda
package management.

The Eric IDE is the only one which integrates the Qt platform for Python
through PyQt for RAD.

Christos.
Loading...