[Qgis-developer] Fwd: A pipinstall plugin is possible? First: What's the difference between the the Osgeo4w Shell?
Mauro Alberti
alberti.m65 at gmail.com
Thu Mar 6 02:11:14 PST 2014
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 <giohappy at gmail.com> 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 <mandoluca at gmail.com>:
>
>> 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 at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
>
> --
> Giovanni Allegri
> http://about.me/giovanniallegri
> Twitter: https://twitter.com/_giohappy_
> blog: http://blog.spaziogis.it
> GEO+ geomatica in Italia http://bit.ly/GEOplus
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140306/60c41874/attachment.html>
More information about the Qgis-developer
mailing list