A pipinstall plugin is possible? First: What's the difference between the Osgeo4w Shell?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

A pipinstall plugin is possible? First: What's the difference between the Osgeo4w Shell?

mando
This post was updated on .
Hi to all,
I'm trying to realize a little plugin to install python modules on windows
via pip.

In first, I would like make a simple thing:
Run get-pip.py inside the plugin  but I encounter two different problem:

What is the shell to call? (Please, don't mind If I point at dufour, is my
qgis crushtest dummy )

subprocess.call('C:\\PROGRA~2\\QGISDU~1\\Osgeo4W.bat python get-pip.py')

or

subprocess.call('"C:\Program Files (x86)\QGIS Dufour\OSGeo4W.bat python
get-pip.py')

Apparently they are the same, but if I install something through  python
inside one, I cannot import the module inside the other.

So, what's the right way to call inside a python plugin the shell?

I found also some problems in using subprocess on windows, and I'm
developping using QProcess class.

Second question:
If I run
subprocess.call('"C:\Program Files (x86)\QGIS Dufour\OSGeo4W.bat python
get-pip.py')

I receive: Nothing distributions at all found fo install...

So the solution are easy: distribute qgis with pip and easy_install inside,
or install pip and easy_intall from shell as I did, then we can use the
plugin as you check out in my screenshots:
[0]

So, if you have suggestions plese let me know.

Best regards
Luca


[0]
https://lh5.googleusercontent.com/-Z6xJHji33E8/UxURKBr1NpI/AAAAAAAADrg/2XWnxf7q6fA/w1075-h604-no/testpipinstaller.PNG

_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

giohappy
I don't know what's the ongoing progress on this topic but I think that a system for the dependencies management should be embedded inside QGIS. I'm not in favour for a plugin to do that.
Having an integrated pip would be more transparent to the user and the plugin developers. The developer should only provide a requirements file which should be transparently managed by the QGIS' Python system.
I heard that Nathan is working on something similar?

giovanni


2014-03-05 11:32 GMT+01:00 Luca Mandolesi <[hidden email]>:
Hi to all,
I'm trying to realize a little plugin to install python modules on windows via pip.

In first, I would like make a simple thing:
Run get-pip.py inside the plugin  but I encounter two different problem:

What is the shell to call? (Please, don't mind If I point at dufour, is my qgis crushtest dummy )

subprocess.call('C:\\PROGRA~2\\QGISDU~1\\Osgeo4W.bat python get-pip.py')

or 

subprocess.call('"C:\Program Files (x86)\QGIS Dufour\OSGeo4W.bat python get-pip.py')

Apparently they are the same, but if I install something through  python inside one, I cannot import the module inside the other.

So, what's the right way to call inside a python plugin the shell?

I found also some problems in using subprocess on windows, and I'm developping using QProcess class.

Second question:
If I run 
subprocess.call('"C:\Program Files (x86)\QGIS Dufour\OSGeo4W.bat python get-pip.py')

I receive: Nothing distributions at all found fo install...

So the solution are easy: distribute qgis with pip and easy_install inside, or install pip and easy_intall from shell as I did, then we can use the plugin as you check out in my screenshots:
[0]

So, if you have suggestions plese let me know.

Best regards
Luca


[0]




_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

Mauro Alberti
In my opinion, a much simpler and cleaner approach (at least from the point of view of a normal user), would be to allow, in QGis Windows (standalone installer), the user not to point to (or not install) an internal Python, but to refer to an external installation. For instance, to point to a Python installed via Python(x,y), where there is already a plenty of modules installed and it is very easy to install/update via pip/easy_install and so on. 

But I'm not sure if some Python modules are customized to be compatible with QGIS Windows interface: for instance, some months ago, I tried unsuccessfully to update, via copy-and-paste from the Python(xy) site packages, numpy to a more recent version than the one available in Qgis (don't remember if 1.8 or 2.0).


mauro




On Thu, Mar 6, 2014 at 10:48 AM, G. Allegri <[hidden email]> wrote:
I don't know what's the ongoing progress on this topic but I think that a system for the dependencies management should be embedded inside QGIS. I'm not in favour for a plugin to do that.
Having an integrated pip would be more transparent to the user and the plugin developers. The developer should only provide a requirements file which should be transparently managed by the QGIS' Python system.
I heard that Nathan is working on something similar?

giovanni


2014-03-05 11:32 GMT+01:00 Luca Mandolesi <[hidden email]>:
Hi to all,
I'm trying to realize a little plugin to install python modules on windows via pip.

In first, I would like make a simple thing:
Run get-pip.py inside the plugin  but I encounter two different problem:

What is the shell to call? (Please, don't mind If I point at dufour, is my qgis crushtest dummy )

subprocess.call('C:\\PROGRA~2\\QGISDU~1\\Osgeo4W.bat python get-pip.py')

or 

subprocess.call('"C:\Program Files (x86)\QGIS Dufour\OSGeo4W.bat python get-pip.py')

Apparently they are the same, but if I install something through  python inside one, I cannot import the module inside the other.

So, what's the right way to call inside a python plugin the shell?

I found also some problems in using subprocess on windows, and I'm developping using QProcess class.

Second question:
If I run 
subprocess.call('"C:\Program Files (x86)\QGIS Dufour\OSGeo4W.bat python get-pip.py')

I receive: Nothing distributions at all found fo install...

So the solution are easy: distribute qgis with pip and easy_install inside, or install pip and easy_intall from shell as I did, then we can use the plugin as you check out in my screenshots:
[0]

So, if you have suggestions plese let me know.

Best regards
Luca


[0]




_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

Nathan Woodrow
On Thu, Mar 6, 2014 at 8:11 PM, Mauro Alberti <[hidden email]> wrote:
In my opinion, a much simpler and cleaner approach (at least from the point of view of a normal user), would be to allow, in QGis Windows (standalone installer), the user not to point to (or not install) an internal Python, but to refer to an external installation. For instance, to point to a Python installed via Python(x,y), where there is already a plenty of modules installed and it is very easy to install/update via pip/easy_install and so on. 

Windows doesn't ship with any version of Python. Yay Windows!  So we bundle our own.  I personally don't mind this so much because it's easier to control the setup if we bundle it.

The main thing here is just including pip and easy_install in all the windows installs, standalone and osgeo4w.  Jurgen has told me that easy_install is included in the 64 bit versions but not 32 bit versions. Is that correct Jurgen?

If pip is included we can easily have plugins tell us what they need and we can install them. 

- Nathan

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

giohappy
Windows doesn't ship with any version of Python. Yay Windows!  So we bundle our own.  I personally don't mind this so much because it's easier to control the setup if we bundle it.

The main thing here is just including pip and easy_install in all the windows installs, standalone and osgeo4w.  Jurgen has told me that easy_install is included in the 64 bit versions but not 32 bit versions. Is that correct Jurgen?

If pip is included we can easily have plugins tell us what they need and we can install them. 


+1, this is exactly what I was imaging.
A requirements.txt for pip would be all that a dev should write.

giovanni
 

- Nathan



--

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

Jürgen E. Fischer
In reply to this post by Mauro Alberti
Hi Mauro,

On Thu, 06. Mar 2014 at 11:11:14 +0100, Mauro Alberti wrote:
> In my opinion, a much simpler and cleaner approach (at least from the point
> of view of a normal user), would be to allow, in QGis Windows (standalone
> installer), the user not to point to (or not install) an internal Python, but
> to refer to an external installation.

That would require it to contain a PyQt4 build against a compatible Qt.

> Python installed via Python(x,y), where there is already a plenty of
> modules installed and it is very easy to install/update via
> pip/easy_install and so on.

http://trac.osgeo.org/osgeo4w/wiki/ExternalPythonPackages


Jürgen

--
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-31
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de
QGIS PSC member (RM)      Germany                      IRC: jef on FreeNode                        

--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

Mauro Alberti
Hi Jurgen,

On Thu, Mar 6, 2014 at 11:32 AM, Jürgen E. <[hidden email]> wrote:

> Python installed via Python(x,y), where there is already a plenty of
> modules installed and it is very easy to install/update via
> pip/easy_install and so on.

http://trac.osgeo.org/osgeo4w/wiki/ExternalPythonPackages


thanks, I will give it a try.

mauro

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

Tom Kralidis
In reply to this post by giohappy


On Thu, 6 Mar 2014, G. Allegri wrote:

> Date: Thu, 6 Mar 2014 02:31:41 -0800
> From: G. Allegri <[hidden email]>
> To: Nathan Woodrow <[hidden email]>
> Cc: qgis-developer List <[hidden email]>
> Subject: Re: [Qgis-developer] Fwd: A pipinstall plugin is possible? First:
>     What's the difference between the the Osgeo4w Shell?
>
>>
>> Windows doesn't ship with any version of Python. Yay Windows!  So we
>> bundle our own.  I personally don't mind this so much because it's easier
>> to control the setup if we bundle it.
>>
>> The main thing here is just including pip and easy_install in all the
>> windows installs, standalone and osgeo4w.  Jurgen has told me that
>> easy_install is included in the 64 bit versions but not 32 bit versions. Is
>> that correct Jurgen?
>>
>> If pip is included we can easily have plugins tell us what they need and
>> we can install them.
>>
>
>
> +1, this is exactly what I was imaging.
> A requirements.txt for pip would be all that a dev should write.
>

+1, this would be great (we currently manage and bundle deps in MetaSearch
as a workaround).

- we would have to make sure the requirements file is standardized
   (others may have different / additional ones, like requirements-dev.txt,
   pip-requirements.txt, etc.).

- for MetaSearch, the requirements.txt file never makes it to the QGIS
   runtime, so plugin providers would need to make sure it does

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

Tim Sutton-4
Hi

The only gotcha to this is that different plugins might require different versions of dependencies. We also toyed around in the past with the idea of each plugin having its own virtualenv for deps and then linking in the QGIS provided site_packages dir into that virtualenv too.

Regards

Tim


On Thu, Mar 6, 2014 at 1:56 PM, Tom Kralidis <[hidden email]> wrote:


On Thu, 6 Mar 2014, G. Allegri wrote:

Date: Thu, 6 Mar 2014 02:31:41 -0800
From: G. Allegri <[hidden email]>
To: Nathan Woodrow <[hidden email]>
Cc: qgis-developer List <[hidden email]>
Subject: Re: [Qgis-developer] Fwd: A pipinstall plugin is possible? First:
    What's the difference between the the Osgeo4w Shell?



Windows doesn't ship with any version of Python. Yay Windows!  So we
bundle our own.  I personally don't mind this so much because it's easier
to control the setup if we bundle it.

The main thing here is just including pip and easy_install in all the
windows installs, standalone and osgeo4w.  Jurgen has told me that
easy_install is included in the 64 bit versions but not 32 bit versions. Is
that correct Jurgen?

If pip is included we can easily have plugins tell us what they need and
we can install them.



+1, this is exactly what I was imaging.
A requirements.txt for pip would be all that a dev should write.


+1, this would be great (we currently manage and bundle deps in MetaSearch
as a workaround).

- we would have to make sure the requirements file is standardized
  (others may have different / additional ones, like requirements-dev.txt,
  pip-requirements.txt, etc.).

- for MetaSearch, the requirements.txt file never makes it to the QGIS
  runtime, so plugin providers would need to make sure it does


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Tim Sutton - QGIS Project Steering Committee Member
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==============================================

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

giohappy

The only gotcha to this is that different plugins might require different versions of dependencies. We also toyed around in the past with the idea of each plugin having its own virtualenv for deps and then linking in the QGIS provided site_packages dir into that virtualenv too.

This would be great because it would solve the problem of users not being administrators. 
 
giovanni


Regards

Tim


On Thu, Mar 6, 2014 at 1:56 PM, Tom Kralidis <[hidden email]> wrote:


On Thu, 6 Mar 2014, G. Allegri wrote:

Date: Thu, 6 Mar 2014 02:31:41 -0800
From: G. Allegri <[hidden email]>
To: Nathan Woodrow <[hidden email]>
Cc: qgis-developer List <[hidden email]>
Subject: Re: [Qgis-developer] Fwd: A pipinstall plugin is possible? First:
    What's the difference between the the Osgeo4w Shell?



Windows doesn't ship with any version of Python. Yay Windows!  So we
bundle our own.  I personally don't mind this so much because it's easier
to control the setup if we bundle it.

The main thing here is just including pip and easy_install in all the
windows installs, standalone and osgeo4w.  Jurgen has told me that
easy_install is included in the 64 bit versions but not 32 bit versions. Is
that correct Jurgen?

If pip is included we can easily have plugins tell us what they need and
we can install them.



+1, this is exactly what I was imaging.
A requirements.txt for pip would be all that a dev should write.


+1, this would be great (we currently manage and bundle deps in MetaSearch
as a workaround).

- we would have to make sure the requirements file is standardized
  (others may have different / additional ones, like requirements-dev.txt,
  pip-requirements.txt, etc.).

- for MetaSearch, the requirements.txt file never makes it to the QGIS
  runtime, so plugin providers would need to make sure it does


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Tim Sutton - QGIS Project Steering Committee Member
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==============================================



--

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

ginetto
In reply to this post by Tim Sutton-4
or we can manage a
- light way (light in the plugin point of view) with simple requirement.txt (or whatever) 
or a
- robust and idependent way managing virtualenv
or a
- kaos way mixing :)

Luigi Pirelli


On 6 March 2014 13:18, Tim Sutton <[hidden email]> wrote:
Hi

The only gotcha to this is that different plugins might require different versions of dependencies. We also toyed around in the past with the idea of each plugin having its own virtualenv for deps and then linking in the QGIS provided site_packages dir into that virtualenv too.

Regards

Tim


On Thu, Mar 6, 2014 at 1:56 PM, Tom Kralidis <[hidden email]> wrote:


On Thu, 6 Mar 2014, G. Allegri wrote:

Date: Thu, 6 Mar 2014 02:31:41 -0800
From: G. Allegri <[hidden email]>
To: Nathan Woodrow <[hidden email]>
Cc: qgis-developer List <[hidden email]>
Subject: Re: [Qgis-developer] Fwd: A pipinstall plugin is possible? First:
    What's the difference between the the Osgeo4w Shell?



Windows doesn't ship with any version of Python. Yay Windows!  So we
bundle our own.  I personally don't mind this so much because it's easier
to control the setup if we bundle it.

The main thing here is just including pip and easy_install in all the
windows installs, standalone and osgeo4w.  Jurgen has told me that
easy_install is included in the 64 bit versions but not 32 bit versions. Is
that correct Jurgen?

If pip is included we can easily have plugins tell us what they need and
we can install them.



+1, this is exactly what I was imaging.
A requirements.txt for pip would be all that a dev should write.


+1, this would be great (we currently manage and bundle deps in MetaSearch
as a workaround).

- we would have to make sure the requirements file is standardized
  (others may have different / additional ones, like requirements-dev.txt,
  pip-requirements.txt, etc.).

- for MetaSearch, the requirements.txt file never makes it to the QGIS
  runtime, so plugin providers would need to make sure it does


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Tim Sutton - QGIS Project Steering Committee Member
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==============================================

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

Larry_S
In reply to this post by Tim Sutton-4
Hi,

On Thu, Mar 6, 2014 at 5:18 AM, Tim Sutton <[hidden email]> wrote:
Hi

The only gotcha to this is that different plugins might require different versions of dependencies. We also toyed around in the past with the idea of each plugin having its own virtualenv for deps and then linking in the QGIS provided site_packages dir into that virtualenv too.

+1 for a virtualenv approach. -1 if virtualenv is *not* the basis of the implementation.

The last thing users need is to download/install a plugin just to test it out, then have it automatically muck about with their global or user Python installation.

I think starting with a single app-wide virtualenv backend and pip-based GUI installer/manager for all plugins and console, first, would be prudent. Then, implement per-plugin virtualenv if that goes well.

Wouldn't per-plugin virtualenv reek havoc in the console, where global access to plugins is often very useful?

I think, as a starting point, reviewing PyCharm's simple module manager and virtualenv creator would be good for including something similar in Plugin Manager, or as an independent dialog [0].
Regards,

Larry

 
Regards

Tim


On Thu, Mar 6, 2014 at 1:56 PM, Tom Kralidis <[hidden email]> wrote:


On Thu, 6 Mar 2014, G. Allegri wrote:

Date: Thu, 6 Mar 2014 02:31:41 -0800
From: G. Allegri <[hidden email]>
To: Nathan Woodrow <[hidden email]>
Cc: qgis-developer List <[hidden email]>
Subject: Re: [Qgis-developer] Fwd: A pipinstall plugin is possible? First:
    What's the difference between the the Osgeo4w Shell?



Windows doesn't ship with any version of Python. Yay Windows!  So we
bundle our own.  I personally don't mind this so much because it's easier
to control the setup if we bundle it.

The main thing here is just including pip and easy_install in all the
windows installs, standalone and osgeo4w.  Jurgen has told me that
easy_install is included in the 64 bit versions but not 32 bit versions. Is
that correct Jurgen?

If pip is included we can easily have plugins tell us what they need and
we can install them.



+1, this is exactly what I was imaging.
A requirements.txt for pip would be all that a dev should write.


+1, this would be great (we currently manage and bundle deps in MetaSearch
as a workaround).

- we would have to make sure the requirements file is standardized
  (others may have different / additional ones, like requirements-dev.txt,
  pip-requirements.txt, etc.).

- for MetaSearch, the requirements.txt file never makes it to the QGIS
  runtime, so plugin providers would need to make sure it does


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Tim Sutton - QGIS Project Steering Committee Member
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==============================================

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: A pipinstall plugin is possible? First: What's the difference between the Osgeo4w Shell?

mando
In reply to this post by mando
I would like also suggest that the installation of python modules it is not necessary linked to a plugin, but also for every experiment we want make through the python console. Ut is usefull keep it on mind for the futures development.

Regards
Luca
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?

Tim Sutton-4
In reply to this post by Larry_S
Hi


On Thu, Mar 6, 2014 at 6:46 PM, Larry Shaffer <[hidden email]> wrote:
Hi,

On Thu, Mar 6, 2014 at 5:18 AM, Tim Sutton <[hidden email]> wrote:
Hi

The only gotcha to this is that different plugins might require different versions of dependencies. We also toyed around in the past with the idea of each plugin having its own virtualenv for deps and then linking in the QGIS provided site_packages dir into that virtualenv too.

+1 for a virtualenv approach. -1 if virtualenv is *not* the basis of the implementation.

The last thing users need is to download/install a plugin just to test it out, then have it automatically muck about with their global or user Python installation.

I think starting with a single app-wide virtualenv backend and pip-based GUI installer/manager for all plugins and console, first, would be prudent. Then, implement per-plugin virtualenv if that goes well.

Wouldn't per-plugin virtualenv reek havoc in the console, where global access to plugins is often very useful?

Yes, this was the main downside we (Martin Dobias and myself) thought of when considering this idea some time ago. But with the current situation it is also possible to have interference between plugins (e.g. if more than one plugins has a top level package called 'utils' the package which will actually get loaded may be not the expected one). One simple work around with the virtual env approach would be that we have a global plugins virtual env (as you suggested above) and a per plugin virtual env which is optional. In metadata.txt, a plugin could nominate itself to be part of the global plugins venv (and thus have access to and be accessible by other plugins, but also vulnerable to changes to package versions made by other plugins) or in a private venv (in which case it would have access only to the app site-packages). I would include core plugins in the global QGIS site-packages so that e.g. processing is always available no matter what.
 

I think, as a starting point, reviewing PyCharm's simple module manager and virtualenv creator would be good for including something similar in Plugin Manager, or as an independent dialog [0].

Yeah they have a neat implementation (though it is probably all done in java so no cut  & paste coding for us :-( ).

Regards

Tim
 

 


Regards,

Larry

 
Regards

Tim


On Thu, Mar 6, 2014 at 1:56 PM, Tom Kralidis <[hidden email]> wrote:


On Thu, 6 Mar 2014, G. Allegri wrote:

Date: Thu, 6 Mar 2014 02:31:41 -0800
From: G. Allegri <[hidden email]>
To: Nathan Woodrow <[hidden email]>
Cc: qgis-developer List <[hidden email]>
Subject: Re: [Qgis-developer] Fwd: A pipinstall plugin is possible? First:
    What's the difference between the the Osgeo4w Shell?



Windows doesn't ship with any version of Python. Yay Windows!  So we
bundle our own.  I personally don't mind this so much because it's easier
to control the setup if we bundle it.

The main thing here is just including pip and easy_install in all the
windows installs, standalone and osgeo4w.  Jurgen has told me that
easy_install is included in the 64 bit versions but not 32 bit versions. Is
that correct Jurgen?

If pip is included we can easily have plugins tell us what they need and
we can install them.



+1, this is exactly what I was imaging.
A requirements.txt for pip would be all that a dev should write.


+1, this would be great (we currently manage and bundle deps in MetaSearch
as a workaround).

- we would have to make sure the requirements file is standardized
  (others may have different / additional ones, like requirements-dev.txt,
  pip-requirements.txt, etc.).

- for MetaSearch, the requirements.txt file never makes it to the QGIS
  runtime, so plugin providers would need to make sure it does


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Tim Sutton - QGIS Project Steering Committee Member
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==============================================

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer




--
Tim Sutton - QGIS Project Steering Committee Member
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==============================================

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer