eric6/Documentation/Source/eric6.CondaInterface.Conda.html

branch
maintenance
changeset 6989
8b8cadf8d7e9
parent 6942
2602857055c5
child 7273
391d6b7b1eff
equal deleted inserted replaced
6938:7926553b7509 6989:8b8cadf8d7e9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.CondaInterface.Conda</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.CondaInterface.Conda</h1>
23 <p>
24 Package implementing the conda GUI logic.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#Conda">Conda</a></td>
34 <td>Class implementing the conda GUI logic.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="Conda" ID="Conda"></a>
43 <h2>Conda</h2>
44 <p>
45 Class implementing the conda GUI logic.
46 </p><h3>Signals</h3>
47 <dl>
48 <dt>condaEnvironmentCreated()</dt>
49 <dd>
50 emitted to indicate the creation of
51 a new environment
52 </dd><dt>condaEnvironmentRemoved()</dt>
53 <dd>
54 emitted to indicate the removal of
55 an environment
56 </dd>
57 </dl>
58 <h3>Derived from</h3>
59 QObject
60 <h3>Class Attributes</h3>
61 <table>
62 <tr><td>RootName</td></tr>
63 </table>
64 <h3>Class Methods</h3>
65 <table>
66 <tr><td>None</td></tr>
67 </table>
68 <h3>Methods</h3>
69 <table>
70 <tr>
71 <td><a href="#Conda.__init__">Conda</a></td>
72 <td>Constructor</td>
73 </tr><tr>
74 <td><a href="#Conda.cleanConda">cleanConda</a></td>
75 <td>Public method to update conda itself.</td>
76 </tr><tr>
77 <td><a href="#Conda.createCondaEnvironment">createCondaEnvironment</a></td>
78 <td>Public method to create a conda environment.</td>
79 </tr><tr>
80 <td><a href="#Conda.getCondaEnvironmentsList">getCondaEnvironmentsList</a></td>
81 <td>Public method to get a list of all Conda environments.</td>
82 </tr><tr>
83 <td><a href="#Conda.getCondaInformation">getCondaInformation</a></td>
84 <td>Public method to get a dictionary containing information about conda.</td>
85 </tr><tr>
86 <td><a href="#Conda.getInstalledPackages">getInstalledPackages</a></td>
87 <td>Public method to get a list of installed packages of a conda environment.</td>
88 </tr><tr>
89 <td><a href="#Conda.getUpdateablePackages">getUpdateablePackages</a></td>
90 <td>Public method to get a list of updateable packages of a conda environment.</td>
91 </tr><tr>
92 <td><a href="#Conda.installPackages">installPackages</a></td>
93 <td>Public method to install packages into a conda environment.</td>
94 </tr><tr>
95 <td><a href="#Conda.removeCondaEnvironment">removeCondaEnvironment</a></td>
96 <td>Public method to remove a conda environment.</td>
97 </tr><tr>
98 <td><a href="#Conda.runProcess">runProcess</a></td>
99 <td>Public method to execute the conda with the given arguments.</td>
100 </tr><tr>
101 <td><a href="#Conda.searchPackages">searchPackages</a></td>
102 <td>Public method to search for a package pattern of a conda environment.</td>
103 </tr><tr>
104 <td><a href="#Conda.uninstallPackages">uninstallPackages</a></td>
105 <td>Public method to uninstall packages of a conda environment (including all no longer needed dependencies).</td>
106 </tr><tr>
107 <td><a href="#Conda.updateAllPackages">updateAllPackages</a></td>
108 <td>Public method to update all packages of a conda environment.</td>
109 </tr><tr>
110 <td><a href="#Conda.updateConda">updateConda</a></td>
111 <td>Public method to update conda itself.</td>
112 </tr><tr>
113 <td><a href="#Conda.updatePackages">updatePackages</a></td>
114 <td>Public method to update packages of a conda environment.</td>
115 </tr><tr>
116 <td><a href="#Conda.writeDefaultConfiguration">writeDefaultConfiguration</a></td>
117 <td>Public method to create a conda configuration with default values.</td>
118 </tr>
119 </table>
120 <h3>Static Methods</h3>
121 <table>
122 <tr><td>None</td></tr>
123 </table>
124 <a NAME="Conda.__init__" ID="Conda.__init__"></a>
125 <h4>Conda (Constructor)</h4>
126 <b>Conda</b>(<i>parent=None</i>)
127 <p>
128 Constructor
129 </p><dl>
130 <dt><i>parent</i> (QObject)</dt>
131 <dd>
132 parent
133 </dd>
134 </dl><a NAME="Conda.cleanConda" ID="Conda.cleanConda"></a>
135 <h4>Conda.cleanConda</h4>
136 <b>cleanConda</b>(<i>cleanAction</i>)
137 <p>
138 Public method to update conda itself.
139 </p><dl>
140 <dt><i>cleanAction</i> (str)</dt>
141 <dd>
142 cleaning action to be performed (must be one of
143 the command line parameters without '--')
144 </dd>
145 </dl><a NAME="Conda.createCondaEnvironment" ID="Conda.createCondaEnvironment"></a>
146 <h4>Conda.createCondaEnvironment</h4>
147 <b>createCondaEnvironment</b>(<i>arguments</i>)
148 <p>
149 Public method to create a conda environment.
150 </p><dl>
151 <dt><i>arguments</i> (list of str)</dt>
152 <dd>
153 list of command line arguments
154 </dd>
155 </dl><dl>
156 <dt>Returns:</dt>
157 <dd>
158 tuple containing a flag indicating success, the directory of
159 the created environment (aka. prefix) and the corresponding Python
160 interpreter
161 </dd>
162 </dl><dl>
163 <dt>Return Type:</dt>
164 <dd>
165 tuple of (bool, str, str)
166 </dd>
167 </dl><a NAME="Conda.getCondaEnvironmentsList" ID="Conda.getCondaEnvironmentsList"></a>
168 <h4>Conda.getCondaEnvironmentsList</h4>
169 <b>getCondaEnvironmentsList</b>(<i></i>)
170 <p>
171 Public method to get a list of all Conda environments.
172 </p><dl>
173 <dt>Returns:</dt>
174 <dd>
175 list of tuples containing the environment name and prefix
176 </dd>
177 </dl><dl>
178 <dt>Return Type:</dt>
179 <dd>
180 list of tuples of (str, str)
181 </dd>
182 </dl><a NAME="Conda.getCondaInformation" ID="Conda.getCondaInformation"></a>
183 <h4>Conda.getCondaInformation</h4>
184 <b>getCondaInformation</b>(<i></i>)
185 <p>
186 Public method to get a dictionary containing information about conda.
187 </p><dl>
188 <dt>Returns:</dt>
189 <dd>
190 dictionary containing information about conda
191 </dd>
192 </dl><dl>
193 <dt>Return Type:</dt>
194 <dd>
195 dict
196 </dd>
197 </dl><a NAME="Conda.getInstalledPackages" ID="Conda.getInstalledPackages"></a>
198 <h4>Conda.getInstalledPackages</h4>
199 <b>getInstalledPackages</b>(<i>name="", prefix=""</i>)
200 <p>
201 Public method to get a list of installed packages of a conda
202 environment.
203 </p><dl>
204 <dt><i>name</i> (str)</dt>
205 <dd>
206 name of the environment
207 </dd><dt><i>prefix</i> (str)</dt>
208 <dd>
209 prefix of the environment
210 </dd>
211 </dl><dl>
212 <dt>Returns:</dt>
213 <dd>
214 list of installed packages. Each entry is a tuple containing
215 the package name, version and build.
216 </dd>
217 </dl><dl>
218 <dt>Return Type:</dt>
219 <dd>
220 list of tuples of (str, str, str)
221 </dd>
222 </dl><dl>
223 <dt>Raises <b>RuntimeError</b>:</dt>
224 <dd>
225 raised to indicate an error in parameters
226 Note: only one of name or prefix must be given.
227 </dd>
228 </dl><a NAME="Conda.getUpdateablePackages" ID="Conda.getUpdateablePackages"></a>
229 <h4>Conda.getUpdateablePackages</h4>
230 <b>getUpdateablePackages</b>(<i>name="", prefix=""</i>)
231 <p>
232 Public method to get a list of updateable packages of a conda
233 environment.
234 </p><dl>
235 <dt><i>name</i> (str)</dt>
236 <dd>
237 name of the environment
238 </dd><dt><i>prefix</i> (str)</dt>
239 <dd>
240 prefix of the environment
241 </dd>
242 </dl><dl>
243 <dt>Returns:</dt>
244 <dd>
245 list of installed packages. Each entry is a tuple containing
246 the package name, version and build.
247 </dd>
248 </dl><dl>
249 <dt>Return Type:</dt>
250 <dd>
251 list of tuples of (str, str, str)
252 </dd>
253 </dl><dl>
254 <dt>Raises <b>RuntimeError</b>:</dt>
255 <dd>
256 raised to indicate an error in parameters
257 Note: only one of name or prefix must be given.
258 </dd>
259 </dl><a NAME="Conda.installPackages" ID="Conda.installPackages"></a>
260 <h4>Conda.installPackages</h4>
261 <b>installPackages</b>(<i>packages, name="", prefix=""</i>)
262 <p>
263 Public method to install packages into a conda environment.
264 </p><dl>
265 <dt><i>packages</i> (list of str)</dt>
266 <dd>
267 list of package names to be installed
268 </dd><dt><i>name</i> (str)</dt>
269 <dd>
270 name of the environment
271 </dd><dt><i>prefix</i> (str)</dt>
272 <dd>
273 prefix of the environment
274 </dd>
275 </dl><dl>
276 <dt>Returns:</dt>
277 <dd>
278 flag indicating success
279 </dd>
280 </dl><dl>
281 <dt>Return Type:</dt>
282 <dd>
283 bool
284 </dd>
285 </dl><dl>
286 <dt>Raises <b>RuntimeError</b>:</dt>
287 <dd>
288 raised to indicate an error in parameters
289 Note: only one of name or prefix must be given.
290 </dd>
291 </dl><a NAME="Conda.removeCondaEnvironment" ID="Conda.removeCondaEnvironment"></a>
292 <h4>Conda.removeCondaEnvironment</h4>
293 <b>removeCondaEnvironment</b>(<i>name="", prefix=""</i>)
294 <p>
295 Public method to remove a conda environment.
296 </p><dl>
297 <dt><i>name</i> (str)</dt>
298 <dd>
299 name of the environment
300 </dd><dt><i>prefix</i> (str)</dt>
301 <dd>
302 prefix of the environment
303 </dd>
304 </dl><dl>
305 <dt>Returns:</dt>
306 <dd>
307 flag indicating success
308 </dd>
309 </dl><dl>
310 <dt>Return Type:</dt>
311 <dd>
312 bool
313 </dd>
314 </dl><dl>
315 <dt>Raises <b>RuntimeError</b>:</dt>
316 <dd>
317 raised to indicate an error in parameters
318 Note: only one of name or prefix must be given.
319 </dd>
320 </dl><a NAME="Conda.runProcess" ID="Conda.runProcess"></a>
321 <h4>Conda.runProcess</h4>
322 <b>runProcess</b>(<i>args</i>)
323 <p>
324 Public method to execute the conda with the given arguments.
325 </p><p>
326 The conda executable is called with the given arguments and
327 waited for its end.
328 </p><dl>
329 <dt><i>args</i> (list of str)</dt>
330 <dd>
331 list of command line arguments
332 </dd>
333 </dl><dl>
334 <dt>Returns:</dt>
335 <dd>
336 tuple containing a flag indicating success and the output
337 of the process
338 </dd>
339 </dl><dl>
340 <dt>Return Type:</dt>
341 <dd>
342 tuple of (bool, str)
343 </dd>
344 </dl><a NAME="Conda.searchPackages" ID="Conda.searchPackages"></a>
345 <h4>Conda.searchPackages</h4>
346 <b>searchPackages</b>(<i>pattern, fullNameOnly=False, packageSpec=False, platform="", name="", prefix=""</i>)
347 <p>
348 Public method to search for a package pattern of a conda environment.
349 </p><dl>
350 <dt><i>pattern</i> (str)</dt>
351 <dd>
352 package search pattern
353 </dd><dt><i>fullNameOnly</i> (bool)</dt>
354 <dd>
355 flag indicating to search for full names only
356 </dd><dt><i>packageSpec</i> (bool)</dt>
357 <dd>
358 flag indicating to search a package specification
359 </dd><dt><i>platform</i> (str)</dt>
360 <dd>
361 type of platform to be searched for
362 </dd><dt><i>name</i> (str)</dt>
363 <dd>
364 name of the environment
365 </dd><dt><i>prefix</i> (str)</dt>
366 <dd>
367 prefix of the environment
368 </dd>
369 </dl><dl>
370 <dt>Returns:</dt>
371 <dd>
372 flag indicating success and a dictionary with package name as
373 key and list of dictionaries containing detailed data for the found
374 packages as values
375 </dd>
376 </dl><dl>
377 <dt>Return Type:</dt>
378 <dd>
379 tuple of (bool, dict of list of dict)
380 </dd>
381 </dl><dl>
382 <dt>Raises <b>RuntimeError</b>:</dt>
383 <dd>
384 raised to indicate an error in parameters
385 Note: only one of name or prefix must be given.
386 </dd>
387 </dl><a NAME="Conda.uninstallPackages" ID="Conda.uninstallPackages"></a>
388 <h4>Conda.uninstallPackages</h4>
389 <b>uninstallPackages</b>(<i>packages, name="", prefix=""</i>)
390 <p>
391 Public method to uninstall packages of a conda environment (including
392 all no longer needed dependencies).
393 </p><dl>
394 <dt><i>packages</i> (list of str)</dt>
395 <dd>
396 list of package names to be uninstalled
397 </dd><dt><i>name</i> (str)</dt>
398 <dd>
399 name of the environment
400 </dd><dt><i>prefix</i> (str)</dt>
401 <dd>
402 prefix of the environment
403 </dd>
404 </dl><dl>
405 <dt>Returns:</dt>
406 <dd>
407 flag indicating success
408 </dd>
409 </dl><dl>
410 <dt>Return Type:</dt>
411 <dd>
412 bool
413 </dd>
414 </dl><dl>
415 <dt>Raises <b>RuntimeError</b>:</dt>
416 <dd>
417 raised to indicate an error in parameters
418 Note: only one of name or prefix must be given.
419 </dd>
420 </dl><a NAME="Conda.updateAllPackages" ID="Conda.updateAllPackages"></a>
421 <h4>Conda.updateAllPackages</h4>
422 <b>updateAllPackages</b>(<i>name="", prefix=""</i>)
423 <p>
424 Public method to update all packages of a conda environment.
425 </p><dl>
426 <dt><i>name</i> (str)</dt>
427 <dd>
428 name of the environment
429 </dd><dt><i>prefix</i> (str)</dt>
430 <dd>
431 prefix of the environment
432 </dd>
433 </dl><dl>
434 <dt>Returns:</dt>
435 <dd>
436 flag indicating success
437 </dd>
438 </dl><dl>
439 <dt>Return Type:</dt>
440 <dd>
441 bool
442 </dd>
443 </dl><dl>
444 <dt>Raises <b>RuntimeError</b>:</dt>
445 <dd>
446 raised to indicate an error in parameters
447 Note: only one of name or prefix must be given.
448 </dd>
449 </dl><a NAME="Conda.updateConda" ID="Conda.updateConda"></a>
450 <h4>Conda.updateConda</h4>
451 <b>updateConda</b>(<i></i>)
452 <p>
453 Public method to update conda itself.
454 </p><dl>
455 <dt>Returns:</dt>
456 <dd>
457 flag indicating success
458 </dd>
459 </dl><dl>
460 <dt>Return Type:</dt>
461 <dd>
462 bool
463 </dd>
464 </dl><a NAME="Conda.updatePackages" ID="Conda.updatePackages"></a>
465 <h4>Conda.updatePackages</h4>
466 <b>updatePackages</b>(<i>packages, name="", prefix=""</i>)
467 <p>
468 Public method to update packages of a conda environment.
469 </p><dl>
470 <dt><i>packages</i> (list of str)</dt>
471 <dd>
472 list of package names to be updated
473 </dd><dt><i>name</i> (str)</dt>
474 <dd>
475 name of the environment
476 </dd><dt><i>prefix</i> (str)</dt>
477 <dd>
478 prefix of the environment
479 </dd>
480 </dl><dl>
481 <dt>Returns:</dt>
482 <dd>
483 flag indicating success
484 </dd>
485 </dl><dl>
486 <dt>Return Type:</dt>
487 <dd>
488 bool
489 </dd>
490 </dl><dl>
491 <dt>Raises <b>RuntimeError</b>:</dt>
492 <dd>
493 raised to indicate an error in parameters
494 Note: only one of name or prefix must be given.
495 </dd>
496 </dl><a NAME="Conda.writeDefaultConfiguration" ID="Conda.writeDefaultConfiguration"></a>
497 <h4>Conda.writeDefaultConfiguration</h4>
498 <b>writeDefaultConfiguration</b>(<i></i>)
499 <p>
500 Public method to create a conda configuration with default values.
501 </p>
502 <div align="right"><a href="#top">Up</a></div>
503 <hr />
504 </body></html>

eric ide

mercurial