ukaea / paramak

Create parametric 3D fusion reactor CAD models
https://paramak.readthedocs.io/en/main/
37 stars 12 forks source link

Conda install #113

Open shimwell opened 4 years ago

shimwell commented 4 years ago

The current install process is a bit messy with a mix of conda and pip

Lets make a conda install and make it easier for people to get started

There are a few how to guides e.g. https://medium.com/@giswqs/building-a-conda-package-and-uploading-it-to-anaconda-cloud-6a3abd1c5c52

shimwell commented 4 years ago

Perhaps we should go for conda forge instead of anaconda cloud as both DAGMC and OpenMC use conda forge and these are codes we aim to connect to

shimwell commented 4 years ago

A PR has been created to keep track of this effort https://github.com/ukaea/paramak/pull/143

shimwell commented 3 years ago

Looks like #143 has got a bit out of date.

The import files from that PR are: build.sh bld.bat environment.yml meta.yaml update_conda.sh

Also looks like conda forge is missing one of the dependencies, so back to conda cloud https://groups.google.com/g/cadquery/c/0wKB21lFlvs/m/LfWmvwSjAAAJ

shimwell commented 3 years ago

I am making progress with this issue. Conda appears to build a package for all os systems this is the branch I'm working on https://github.com/ukaea/paramak/tree/conda_install

shimwell commented 3 years ago

Package creation and upload appears to be working but the install is not quite working

Screenshot from 2021-02-02 22-22-43

jwscook commented 3 years ago

What's the output with -v for verbosity in conda install -v -c openmcworkshop paramak?

shimwell commented 3 years ago

Thanks for the suggestion

I should mention I did this inside a container but it appears to suggest the python version is no good. Which I don't quite understand as I though I had built for a few python versions https://github.com/ukaea/paramak/blob/7924ab0b20e53b0122f56789734bfb795cd73d38/conda_build.sh#L3

sudo docker run -it continuumio/miniconda3
conda install -v -c openmcworkshop paramak

Screenshot from 2021-02-05 13-41-15

jwscook commented 3 years ago

Looks like paramak doesn't allow python version 3.7 or 3.8 for that matter. Can you try it with a 3.6 miniconda container?

shimwell commented 3 years ago

Something for next week but just wanted to post these finds before I forget

sudo docker run -it continuumio/miniconda3
conda create --name myenv python=3.6
conda activate myenv
conda install -v -c openmcworkshop paramak

Screenshot from 2021-02-05 21-58-05

peter-t-fox commented 3 years ago

I've tried to resolve this today, but have made essentially no progress. Things I've tried:

file name   : paramak-0.2.3-py36hfeaa757_0.tar.bz2
name        : paramak
version     : 0.2.3
build       : py36hfeaa757_0
build number: 0
size        : 190.6 MB
license     : MIT
subdir      : linux-64
url         : https://conda.anaconda.org/openmcworkshop/linux-64/paramak-0.2.3-py36hfeaa757_0.tar.bz2
md5         : 9ba5566e753d15ff63c056108533bf30
timestamp   : 2021-02-05 13:55:27 UTC
dependencies: 
  - cadquery
  - matplotlib
  - mpmath
  - neutronics_material_maker
  - numpy
  - plasmaboundaries
  - plotly
  - pytest-cov
  - python >=3.6,<3.7.0a0
  - python_abi 3.6.* *_cp36m
  - scipy
  - sympy

which shows the expected python range. This suggests that it might be a conflict in the dependencies rather than in the core paramak package itself.

In general, it seems to be very difficult to extract information from conda concerning how it determines when there is a specification mismatch, and what packages in the dependency list contribute to any element of the specification. Without this information, it's very difficult to see what's going on.

shimwell commented 3 years ago

Sounds like a good investigation, thanks for taking a look at this. The puzzle continues. It will be all the more satisfying when solved.

I wonder if it is getting the old version of cadquery before the project shifted away from freecad

shimwell commented 3 years ago

Ignore that last thought of mine, looks like the channel priority is correct. channel cadquery is higher priority than channel conda-forge in the conda_build.sh

shimwell commented 3 years ago

I've been trying this again but this time in a new branch with the latest features from the parmak as the old branch was getting a bit out of date and have a few conflicts.

https://github.com/ukaea/paramak/tree/conda_install_2