<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>Hi to all,</div><div>I'm trying to realize a little plugin to install python modules on windows via pip.</div><div><br></div><div>In first, I would like make a simple thing:</div>
<div>Run get-pip.py inside the plugin but I encounter two different problem:</div>
<div><br></div><div>What is the shell to call? (Please, don't mind If I point at dufour, is my qgis crushtest dummy )</div><div><br></div><div>subprocess.call('C:\\PROGRA~2\\QGISDU~1\\Osgeo4W.bat python get-pip.py')</div>
<div><br></div><div>or </div><div><br></div><div>subprocess.call('"C:\Program Files (x86)\QGIS Dufour\OSGeo4W.bat python get-pip.py')</div><div><br></div><div>Apparently they are the same, but if I install something through python inside one, I cannot import the module inside the other.</div>
<div><br></div><div>So, what's the right way to call inside a python plugin the shell?</div><div><br></div><div>I found also some problems in using subprocess on windows, and I'm developping using QProcess class.</div>
<div><br></div><div>Second question:</div><div>If I run <br></div><div>subprocess.call('"C:\Program Files (x86)\QGIS Dufour\OSGeo4W.bat python get-pip.py')<br></div><div><br></div><div>I receive: Nothing distributions at all found fo install...</div>
<div><br></div><div>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:</div><div>
[0]</div><div><br></div><div>So, if you have suggestions plese let me know.</div><div><br></div><div>Best regards</div><div>Luca</div><div><br></div><div><br></div><div>[0]</div><div><a href="https://lh5.googleusercontent.com/-Z6xJHji33E8/UxURKBr1NpI/AAAAAAAADrg/2XWnxf7q6fA/w1075-h604-no/testpipinstaller.PNG" target="_blank">https://lh5.googleusercontent.com/-Z6xJHji33E8/UxURKBr1NpI/AAAAAAAADrg/2XWnxf7q6fA/w1075-h604-no/testpipinstaller.PNG</a><br>
</div><div><br></div><div><br></div></div>
</div><br></div>