Skip to content
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

Change conda related sections in the README and the docs #980

Merged
merged 26 commits into from
Feb 16, 2022

Conversation

adam-urbanczyk
Copy link
Member

@adam-urbanczyk adam-urbanczyk commented Feb 6, 2022

Small improvements of the conda installation instructions.

@codecov
Copy link

codecov bot commented Feb 6, 2022

Codecov Report

Merging #980 (b0b66cb) into master (23de5cc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #980   +/-   ##
=======================================
  Coverage   96.26%   96.26%           
=======================================
  Files          40       40           
  Lines        9342     9344    +2     
  Branches     1103     1104    +1     
=======================================
+ Hits         8993     8995    +2     
  Misses        205      205           
  Partials      144      144           
Impacted Files Coverage Δ
cadquery/assembly.py 95.04% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23de5cc...b0b66cb. Read the comment docs.

doc/installation.rst Outdated Show resolved Hide resolved
@jmwright
Copy link
Member

jmwright commented Feb 6, 2022

@adam-urbanczyk This PR looks good to me except that I haven't used miniforge, so I don't know it's strengths/weaknesses vs miniconda.

@adam-urbanczyk
Copy link
Member Author

@jmwright miniforge is a minimal conda installation configured to use the (free) conda-forge channel (which is the channel we are relying on). I also added this based on the comments on bloat floating around HaD/HN. I also added section on portable win install.

@jmwright jmwright self-requested a review February 7, 2022 10:42
@jmwright
Copy link
Member

jmwright commented Feb 7, 2022

Ok, thanks @adam-urbanczyk .

@Jojain since you're already involved in this discussion, will you be the other official reviewer? We normally try to have two devs check a PR before merging unless it's a super simple one.

@Jojain
Copy link
Contributor

Jojain commented Feb 7, 2022

Sure if you want too, I will try this new installation process

@jmwright
Copy link
Member

jmwright commented Feb 7, 2022

@Jojain If you have time, please do.

@Jojain
Copy link
Contributor

Jojain commented Feb 7, 2022

@adam-urbanczyk
I just tried the miniforge commands lines without success.
curl.exe -o miniforge.exe https://superuser.com seems to install something but without more info (I don't know what is curl)

Then
start /wait "" miniforge.exe /InstallationType=JustMe /RegisterPython=0 /NoRegistry=1 /NoScripts=1 /S /D=%USERPROFILE%\Miniforge3 Fails with : System cannot execute specified program

@jmwright
Copy link
Member

jmwright commented Feb 7, 2022

It installs fine for me in Ubuntu, so maybe the problem is specific to Windows?

README.md Outdated Show resolved Hide resolved
doc/installation.rst Outdated Show resolved Hide resolved
@jmwright
Copy link
Member

jmwright commented Feb 7, 2022

The installation of miniforge works on a Lubuntu 20.04 VM, but the environment solve always fails when I try to run the following line.

conda install -c conda-forge -c cadquery cadquery=master

@adam-urbanczyk
Copy link
Member Author

@adam-urbanczyk I just tried the miniforge commands lines without success. curl.exe -o miniforge.exe https://superuser.com seems to install something but without more info (I don't know what is curl)

Then start /wait "" miniforge.exe /InstallationType=JustMe /RegisterPython=0 /NoRegistry=1 /NoScripts=1 /S /D=%USERPROFILE%\Miniforge3 Fails with : System cannot execute specified program

I made a stupid copy-paster error - should be corrected now @Jojain .

doc/installation.rst Outdated Show resolved Hide resolved
@Jojain
Copy link
Contributor

Jojain commented Feb 7, 2022

I got the install successful. I've read very quickly what is miniforge, if I understand well (put aside what's under the hood) miniforge is miniconda with the default channel setup to conda-forge ? So one could install cadquery with the following :
conda install -c cadquery cadquery=master ?

Since I have also miniconda installed I don't know which one is activating but if I run
conda activate base in a cmd prompt does it activate the miniforge env or I need to use your command line (for activation?)

@jmwright
Copy link
Member

jmwright commented Feb 8, 2022

@Jojain On Linux, I run something like $HOME/miniforge/bin/activate to make sure I have the right one (notice the path has miniforge and not minconda. That's assuming that miniconda is not already activated for the current shell.

@jmwright
Copy link
Member

jmwright commented Feb 8, 2022

I swapped Anaconda out for Miniforge on my main Ubuntu 20.04 install and it works fine. However, the solve still always fails on the Lubuntu 20.04 VM that I've also tried it on. Below is what it always shows.

Screenshot from 2022-02-08 08-13-43

@adam-urbanczyk
Copy link
Member Author

Can you share (link to) the vm image?

@jmwright
Copy link
Member

jmwright commented Feb 8, 2022

VM image download is here. I ran it in VirtualBox.

@lorenzncode
Copy link
Member

@jmwright This could be an out of memory issue. I've also experienced that with conda when allocating too little memory. I've had it fail when allocating 4GB. I couldn't reproduce that today at 4GB. Here at 2GB (dmesg):

Screenshot from 2022-02-08 23-11-49

One advantage of miniforge is it also provides mamba. You might try replacing conda install with mamba install and see if it completes successfully.

I checked RSS of the conda/mamba install process today on Ubuntu 20.04.
conda: peak 2.7GiB (separate install from above, with more memory allocated)
mamba: peak 280MiB

@Jojain
Copy link
Contributor

Jojain commented Feb 9, 2022

I don't really want to break my miniconda install to try miniforge alone, but I have been successful with the installation and activate on my Windows computer, so I think it's good (I've also read it's bundled directly with mamba ?)

@jmwright
Copy link
Member

jmwright commented Feb 9, 2022

If mamba uses less memory, should we consider using it by default instead of the conda command? I'm not familiar with mamba, so I don't know the implications.

@Jojain
Copy link
Contributor

Jojain commented Feb 9, 2022

I don't know about the memory but it's faster than conda and gives better error message when there is dependencies conflicts (however for some reason mamba activate myenv doesn't work so I use both conda and mamba )

@fedorkotov
Copy link
Contributor

fedorkotov commented Feb 10, 2022

I have just nuked miniconda install on Windows and replaced it with mambaforge (condaforge variant with mamba preinstalled in base environment). It is fast. And mamba activate envname works. But importing cadquery fails see #990. Don't know if mamba or condaforge have anything to do with this problem though. My environment for cadquery in miniconda (that is now destroyed) worked but it was not updated for a long time.

@adam-urbanczyk
Copy link
Member Author

@jmwright @Jojain I think I fixed all the defects. Do you want to change from miniforge to mambaforge or leave as-is?

BTW: I cannot reproduce #990.

@jmwright
Copy link
Member

I just switched to mambaforge and it worked fine to create a CadQuery environment, and import cadquery worked as well. I'm on Linux though (Ubuntu 20.04).

@jmwright
Copy link
Member

I am also unable to reproduce #990 on Windows 11 64-bit with mambaforge. I'm ok with using mambaforge, but again, don't have a lot of experience with it. I have switch my systems over to it and will be using it as my primary way to handle my CadQuery environments moving forward.

@adam-urbanczyk
Copy link
Member Author

I am also unable to reproduce #990 on Windows 11 64-bit with mambaforge. I'm ok with using mambaforge, but again, don't have a lot of experience with it. I have switch my systems over to it and will be using it as my primary way to handle my CadQuery environments moving forward.

OK, so I'd propose to stay with conda for now. The only known issue is the memory usage, I think that it is acceptable.

@fedorkotov
Copy link
Contributor

For me a workaround for #990 on Windows 8.1 was adding -c conda-forge to installation or environment creation command. No one seems to be able to reproduce it on more modern operating systems (Windows or Linux). Besides Windows 8.1 has only one more year of life left before end of extended support from M$. So this is not really an issue anymore.

@adam-urbanczyk
Copy link
Member Author

Alright merging with conda/miniforge, in the future we'll probably change it to mamba/mambaforge.

@adam-urbanczyk adam-urbanczyk merged commit 9e9b452 into master Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants