-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] Add-on installation with Conda #2561
Conversation
if command == Install: | ||
self.setStatusMessage( | ||
"Installing {}".format(pkg.installable.name)) | ||
if self.conda: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If self.conda
is an instance of CondaInstaller()
, shouldn't this check be self.conda.conda
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically yes, but since CondaInstaller reimplements __bool__
, this is the same thing
e0a88cb
to
e95028b
Compare
Codecov Report
@@ Coverage Diff @@
## master #2561 +/- ##
==========================================
+ Coverage 75.83% 75.83% +<.01%
==========================================
Files 338 338
Lines 59541 59541
==========================================
+ Hits 45150 45152 +2
+ Misses 14391 14389 -2 |
Not sure I tested it right, but I've made a new environment and got the branch from Github. Ran Orange and tried to install the add-ons via the dialog. Got this:
Windows10. |
e95028b
to
c356dc9
Compare
Fixed, can you try again? |
Um, now I don't get this error, but another issue occurs. Potentially not related to this PR, but I tried to install all the add-ons and some crash normally (Geo, Recommendation, Timeseries), while the rest seem to get installed. However, when I re-run Orange, the entire program crashes. Ran with -l 4, I see that the issue is in Spark and Textable add-ons, most likely. |
bc7b8ce
to
1278e52
Compare
Work on linux without conda. Works just as well as installing with pip directly (succeeds if pip succeeds, fails with an error of it). |
1278e52
to
4e502cb
Compare
4e502cb
to
0ab4f25
Compare
Blocked by #2616 Until we install conda command and conda-forge channel with our miniconda installer, this will not work |
0ab4f25
to
700dd68
Compare
@kernc, @ajdapretnar, @markotoplak I think I am done. Could you try it out again? |
else: | ||
files = [os.path.join( | ||
USER_SITE, 'orangecontrib', | ||
dist.project_name.split('-')[-1].lower()), ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes all user-installed add-ons are in orangecontrib
package, but this is just an internal convention, with the real add-on being anything that provides an orange3.addon
entry point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I should wrap this in try: except: pass?
This is the same code we are using at the moment, I have just moved it to a separate class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, and I wrote it, but it's wrong in its assumptions.
No idea how to make it correct.
HTH
Installing e.g. Orange3-Timeseries
Orange3 (lower version) gets reinstalled. |
@kernc what are your conda channel priorities? |
The order of channels in .condarc:
|
When installing Orange3-Network, installation seems to stall forever. It reaches 'Orange3-Network successfully installed' message, but it never exits the process. I also can't quit the dialog window and have to force quit in the console. Also, installations prints every increment in the process, e.g. orange3-networks 3%, orange3-networks 4%, orange3-networks 5%... etc. Is there a silent mode we can turn on? :) |
700dd68
to
6da6958
Compare
I have added the -q flag to conda calls. The stalling is not related to conda, since it already happens sometimes with the master version of Orange. |
b73c8d1
to
c0aeb7b
Compare
Otherwise, orange tries to downgrade to the (outdated) version from defaults.
I have disabled the conda installation of add-ons by default (it can be enabled with a checkbox in settings), hidden the download progressbar (--quiet option is passed to conda). I have updated the order of channels in the environment created by our miniconda installer, as having defaults on top downgrades orange whenever you install an add-on. Pip uninstall now only runs when conda fails to uninstall. And all package names passed to conda are now lowercase (heuristic, but works :)). If there is anything that needs to be fixed, please let me know. Otherwise I consider this PR complete. |
As some commands are case sensitive and other not, always normalize package names to lowercase. When uninstalling, run pip uninstall only when that package could not be uninstalled with conda.
348ebad
to
7fc1f91
Compare
Issue
Some add-ons have dependencies that are a pain to install on windows. Conda makes this easier
Description of changes
Add-on installation/upgrading/uninstallation calls conda commands before pip. If conda command succeeds, pip says that everything is up to date/uninstalled and does nothing.
Needs testing on win/linux, with different configurations (orange installed in conda root/conda environment, orange installed beside conda, ...)
Includes