Installation of Cantera for Python3.5 on Mac OS X 10.11 "el Capitan"

947 views
Skip to first unread message

MortI80

unread,
Oct 6, 2015, 4:16:36 AM10/6/15
to Cantera Users' Group
Dear all,

I recently updated my Mac to the new OS X El Capitan. Now I try to install Cantera 2.2.0 to use it with Python 3.5 and Matlab r2015b. Well, it does not work when I follow the procedure shown on Cantera Installation Instructions.. Is there anybody outside in this world who has some experience with the new OS and the installation procedure? 

Thanks in advance

Ray Speth

unread,
Oct 6, 2015, 10:35:48 AM10/6/15
to Cantera Users' Group
Hi,

You might try describing what you actually did (i.e. exactly what commands you executed) and what the results were (including the full output of all of the commands). No one can diagnose the problem based only on the information that "it does not work".

Regards,
Ray

MortI80

unread,
Oct 7, 2015, 4:05:00 AM10/7/15
to Cantera Users' Group
Hi Ray,

you are right. I just thought somebody already had some problems and could have helped me directly. However, here are the full outputs of my commands following the installation commands you can find here.


1 .Install Xcode and Homebrew

- Xcode Version 7.0.1 is installed and up to date

- Homebrew is installed 


2. Set up the compilation environment

$ brew tap homebrew/science


==> Tapping homebrew/science

Cloning into '/usr/local/Library/Taps/homebrew/homebrew-science'...

remote: Counting objects: 564, done.

remote: Compressing objects: 100% (561/561), done.

remote: Total 564 (delta 2), reused 76 (delta 1), pack-reused 0

Receiving objects: 100% (564/564), 447.29 KiB | 532.00 KiB/s, done.

Resolving deltas: 100% (2/2), done.

Checking connectivity... done.

Tapped 556 formulae (584 files, 3,0M)


$ brew update

Already up-to-date.


$ brew install python scons sundials

Already downloaded: /Library/Caches/Homebrew/python-2.7.10_2.el_capitan.bottle.3.tar.gz

==> Pouring python-2.7.10_2.el_capitan.bottle.3.tar.gz

==> /usr/local/Cellar/python/2.7.10_2/bin/python -s setup.py --no-user-cfg install --force --verbose --single-versi

==> /usr/local/Cellar/python/2.7.10_2/bin/python -s setup.py --no-user-cfg install --force --verbose --single-versi

==> /usr/local/Cellar/python/2.7.10_2/bin/python -s setup.py --no-user-cfg install --force --verbose --single-versi

==> Caveats

Pip and setuptools have been installed. To update them

 pip install --upgrade pip setuptools


You can install Python packages with

 pip install <package>


They will install into the site-package directory

 /usr/local/lib/python2.7/site-packages



.app bundles were installed.

Run `brew linkapps python` to symlink these to /Applications.

==> Summary

🍺  /usr/local/Cellar/python/2.7.10_2: 4867 files, 76M

Already downloaded: /Library/Caches/Homebrew/scons-2.3.6.el_capitan.bottle.tar.gz

==> Pouring scons-2.3.6.el_capitan.bottle.tar.gz

🍺  /usr/local/Cellar/scons/2.3.6: 208 files, 2,6M

==> Installing sundials from homebrew/homebrew-science

Already downloaded: /Library/Caches/Homebrew/sundials-2.5.0.tar.gz

==> Patching

patching file examples/idas/serial/idasRoberts_ASAi_dns.c

patching file src/kinsol/kinsol.c

patching file examples/kinsol/fcmix_parallel/fkinDiagon_kry_p.f

patching file examples/kinsol/fcmix_serial/fkinDiagon_kry.f

patching file src/kinsol/fcmix/fkinsol.c

patching file src/kinsol/fcmix/fkinsol.h

patching file src/cvode/cvode.c

patching file src/cvodes/cvodes.c

patching file src/ida/ida.c

patching file src/idas/idas.c

patching file src/cvode/cvode.c

patching file src/cvodes/cvodes.c

patching file src/ida/ida.c

patching file src/idas/idas.c

patching file src/kinsol/kinsol.c

patching file config/SundialsMPIC.cmake

patching file src/cvode/cvode.c

patching file src/cvodes/cvodes.c

patching file src/ida/ida.c

patching file src/idas/idas.c

patching file examples/cvodes/serial/cvsHessian_ASA_FSA.c

patching file src/cvodes/cvodes.c

patching file src/kinsol/kinsol_direct.c

patching file src/cvode/cvode_lapack.c

patching file src/cvodes/cvodes_lapack.c

patching file src/ida/ida_lapack.c

patching file src/idas/idas_lapack.c

patching file src/kinsol/kinsol_lapack.c

patching file src/kinsol/kinsol_direct.c

patching file examples/kinsol/fcmix_parallel/fkinDiagon_kry_p.f

==> ./configure --prefix=/usr/local/Cellar/sundials/2.5.0 --enable-shared --enable-examples --disable-fcmix --disab

==> make

==> ./cvode/serial/cvAdvDiff_bnd

==> ./cvode/serial/cvDirectDemo_ls

==> ./cvode/serial/cvDiurnal_kry

==> ./cvode/serial/cvDiurnal_kry_bp

==> ./cvode/serial/cvKrylovDemo_ls

==> ./cvode/serial/cvKrylovDemo_prec

==> ./cvode/serial/cvRoberts_dns

==> ./cvode/serial/cvRoberts_dns_uw

==> ./ida/serial/idaFoodWeb_bnd

==> ./ida/serial/idaHeat2D_bnd

==> ./ida/serial/idaHeat2D_kry

==> ./ida/serial/idaKrylovDemo_ls

==> ./ida/serial/idaRoberts_dns

==> ./ida/serial/idaSlCrank_dns

==> ./kinsol/serial/kinFerTron_dns

==> ./kinsol/serial/kinFoodWeb_kry

==> ./kinsol/serial/kinKrylovDemo_ls

==> ./kinsol/serial/kinLaplace_bnd

==> ./kinsol/serial/kinRoboKin_dns

==> ./cvodes/serial/cvsAdvDiff_ASAi_bnd

==> ./cvodes/serial/cvsAdvDiff_bnd

==> ./cvodes/serial/cvsDirectDemo_ls

==> ./cvodes/serial/cvsDiurnal_kry

==> ./cvodes/serial/cvsDiurnal_kry_bp

==> ./cvodes/serial/cvsFoodWeb_ASAi_kry

==> ./cvodes/serial/cvsFoodWeb_ASAp_kry

==> ./cvodes/serial/cvsHessian_ASA_FSA

==> ./cvodes/serial/cvsKrylovDemo_ls

==> ./cvodes/serial/cvsKrylovDemo_prec

==> ./cvodes/serial/cvsRoberts_ASAi_dns

==> ./cvodes/serial/cvsRoberts_dns

==> ./cvodes/serial/cvsRoberts_dns_uw

==> ./cvodes/serial/cvsRoberts_FSA_dns -sensi stg t

==> ./cvodes/serial/cvsDiurnal_FSA_kry -sensi stg t

==> ./cvodes/serial/cvsAdvDiff_FSA_non -sensi stg t

==> ./idas/serial/idasAkzoNob_ASAi_dns

==> ./idas/serial/idasAkzoNob_dns

==> ./idas/serial/idasFoodWeb_bnd

==> ./idas/serial/idasHeat2D_bnd

==> ./idas/serial/idasHeat2D_kry

==> ./idas/serial/idasHessian_ASA_FSA

==> ./idas/serial/idasKrylovDemo_ls

==> ./idas/serial/idasRoberts_ASAi_dns

==> ./idas/serial/idasRoberts_dns

==> ./idas/serial/idasSlCrank_dns

==> ./idas/serial/idasSlCrank_FSA_dns

==> ./idas/serial/idasRoberts_FSA_dns -sensi stg t

==> make install

==> Caveats

Some failures were observed on Yosemite when using MPICH2.

The failures did not occur with OpenMPI. For more information, see

==> Summary

🍺  /usr/local/Cellar/sundials/2.5.0: 187 files, 3,8M, built in 75 seconds


$ which python

/usr/local/bin/python


$ pip install cython numpy

Collecting cython

 Downloading Cython-0.23.3-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.6MB)

   100% |████████████████████████████████| 3.6MB 151kB/s

Collecting numpy

 Using cached numpy-1.10.0.tar.gz

Building wheels for collected packages: numpy

 Running setup.py bdist_wheel for numpy

 Stored in directory: /Users/XXX/Library/Caches/pip/wheels/48/e1/50/8f9090b5d49ce11925954f1d97952ef6d209f7d032c57c325c

Successfully built numpy

Installing collected packages: cython, numpy

Successfully installed cython-0.23.3 numpy-1.10.0


$ brew install python3

Warning: python3-3.5.0 already installed

 
- so I removed it using: 

$ brew uninstall python3

Uninstalling /usr/local/Cellar/python3/3.5.0... (8,0K)

 
- and made a new installation 

$ brew install python3

==> Downloading https://homebrew.bintray.com/bottles/python3-3.5.0.el_capitan.bottle.3.tar.gz

######################################################################## 100,0%

==> Pouring python3-3.5.0.el_capitan.bottle.3.tar.gz

Error: The `brew link` step did not complete successfully

The formula built, but is not symlinked into /usr/local

Could not symlink bin/2to3-3.5

Target /usr/local/bin/2to3-3.5

already exists. You may want to remove it:

  rm '/usr/local/bin/2to3-3.5'


To force the link and overwrite all conflicting files:

  brew link --overwrite python3


To list all files that would be deleted:

  brew link --overwrite --dry-run python3


Possible conflicting files are:

/usr/local/bin/2to3-3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/2to3-3.5

/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/idle3

/usr/local/bin/idle3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/idle3.5

/usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/pydoc3

/usr/local/bin/pydoc3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/pydoc3.5

/usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3

/usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3-config

/usr/local/bin/python3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5

/usr/local/bin/python3.5-config -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5-config

/usr/local/bin/python3.5m -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m

/usr/local/bin/python3.5m-config -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m-config

/usr/local/bin/pyvenv -> /Library/Frameworks/Python.framework/Versions/3.5/bin/pyvenv

/usr/local/bin/pyvenv-3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/pyvenv-3.5

==> /usr/local/Cellar/python3/3.5.0/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scrip

==> /usr/local/Cellar/python3/3.5.0/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scrip

==> /usr/local/Cellar/python3/3.5.0/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scrip

==> Caveats

Pip and setuptools have been installed. To update them

  pip3 install --upgrade pip setuptools


You can install Python packages with

  pip3 install <package>


They will install into the site-package directory

  /usr/local/lib/python3.5/site-packages


See: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md


.app bundles were installed.

Run `brew linkapps python3` to symlink these to /Applications.

==> Summary

🍺  /usr/local/Cellar/python3/3.5.0: 3416 files, 59M


- checking if python 3 was really installed:

$ brew install python3

Warning: python3-3.5.0 already installed, it's just not linked


- it was installed, hence I follow the instructions above 

$ brew link --overwrite --dry-run python3

Would remove:

/usr/local/bin/2to3-3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/2to3-3.5

/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/idle3

/usr/local/bin/idle3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/idle3.5

/usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/pydoc3

/usr/local/bin/pydoc3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/pydoc3.5

/usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3

/usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3-config

/usr/local/bin/python3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5

/usr/local/bin/python3.5-config -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5-config

/usr/local/bin/python3.5m -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m

/usr/local/bin/python3.5m-config -> /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m-config

/usr/local/bin/pyvenv -> /Library/Frameworks/Python.framework/Versions/3.5/bin/pyvenv

/usr/local/bin/pyvenv-3.5 -> /Library/Frameworks/Python.framework/Versions/3.5/bin/pyvenv-3.5

- removing 

$ rm '/usr/local/bin/2to3-3.5'


- linking

$ brew link --overwrite python3

Linking /usr/local/Cellar/python3/3.5.0... 19 symlinks created

 
- checking again if Python3 is installed  and linked

$ brew install python3

Warning: python3-3.5.0 already installed

- everything ok so let's procede....
 

$ pip3 install numpy cython

Collecting numpy

  Using cached numpy-1.10.0.tar.gz

Collecting cython

  Using cached Cython-0.23.3-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl

Installing collected packages: numpy, cython

  Running setup.py install for numpy

Successfully installed cython-0.23.3 numpy-1.10.0 

3. Compile and install cantera
$ brew install cantera --with-graphviz --with-python3 --HEAD

==> Installing cantera from homebrew/homebrew-science

==> Installing dependencies for homebrew/science/cantera: libpng, graphviz

==> Installing homebrew/science/cantera dependency: libpng

######################################################################## 100,0%

==> Pouring libpng-1.6.18.el_capitan.bottle.tar.gz

🍺  /usr/local/Cellar/libpng/1.6.18: 17 files, 1,2M

==> Installing homebrew/science/cantera dependency: graphviz

######################################################################## 100,0%

==> Pouring graphviz-2.38.0.el_capitan.bottle.1.tar.gz

🍺  /usr/local/Cellar/graphviz/2.38.0: 469 files, 68M

==> Installing homebrew/science/cantera

Cloning into '/Library/Caches/Homebrew/cantera--git'...

remote: Counting objects: 2050, done.

remote: Compressing objects: 100% (1667/1667), done.

remote: Total 2050 (delta 507), reused 705 (delta 348), pack-reused 0

Receiving objects: 100% (2050/2050), 3.67 MiB | 936.00 KiB/s, done.

Resolving deltas: 100% (507/507), done.

Checking connectivity... done.

==> Checking out branch master

######################################################################## 100,0%

==> python -c import setuptools... --no-user-cfg install --prefix=/private/tmp/cantera20151006-5024-1hg9yb6/cython 

==> /usr/local/opt/scons/bin/scons build prefix=/usr/local/Cellar/cantera/HEAD python_package=full CC=/usr/bin/clan

==> /usr/local/opt/scons/bin/scons test

Last 15 lines from /Users/XXX/Library/Logs/Homebrew/cantera/03.scons:

/usr/bin/clang++ -o test_problems/cathermo/DH_graph_1/DH_graph_1 test_problems/cathermo/DH_graph_1/DH_graph_1.o -Lbuild/lib -lcantera -lsundials_cvodes -lsundials_ida -lsundials_nvecserial -framework Accelerate

* Running test 'DH_graph_dilute'...

Comparing 'DH_NaCl_dilute_blessed.csv' with 'DH_NaCl_dilute_output.csv'

scons: *** [test_problems/cathermo/DH_graph_1/.passed-DH_graph_dilute] TypeError : genfromtxt() got an unexpected keyword argument 'skiprows'

Traceback (most recent call last):

  File "/usr/local/Cellar/scons/2.3.6/libexec/scons-local/SCons/Action.py", line 1063, in execute

    result = self.execfunction(target=target, source=rsources, env=env)

  File "/private/tmp/cantera20151006-5024-1hg9yb6/site_scons/buildutils.py", line 162, in regression_test

    d = compareFiles(env, pjoin(dir, blessed), pjoin(dir, output))

  File "/private/tmp/cantera20151006-5024-1hg9yb6/site_scons/buildutils.py", line 186, in compareFiles

    return compareCsvFiles(env, file1, file2)

  File "/private/tmp/cantera20151006-5024-1hg9yb6/site_scons/buildutils.py", line 336, in compareCsvFiles

    data1 = np.genfromtxt(file1, skiprows=headerRows, delimiter=',')

TypeError: genfromtxt() got an unexpected keyword argument 'skiprows'

scons: building terminated because of errors.


If reporting this issue please do so at (not Homebrew/homebrew):


------------------------
After the installation I can find a folder named "cantera" here:
/usr/local/lib/python2.7/site-packages/cantera/
it includes just one file: "__init__.pyc"
the next folder does not exist:
/usr/local/lib/python2.7/site-packages/cantera/

any ideas? I hope the output helps... 

MortI80

unread,
Oct 7, 2015, 5:51:20 AM10/7/15
to Cantera Users' Group
Hi Ray, 

I ran the installation of cantera again with verbose output and without the python3 option:
$brew install cantera --with-graphviz --HEAD
You will find the verbose output and logfiles enclosed. Does that help?
All the best and thanks!
Installing_Cantera_verbose_output.rtf
01.python
02.scons
03.scons
config.log

Nick Curtis

unread,
Oct 7, 2015, 9:55:29 AM10/7/15
to Cantera Users' Group
Hi, it looks like the issue is the version of numpy (1.10) that brew installed removed the skiprows parameter from genfromtxt (en route to numpy 2.0)
The easiest fix would be to install numpy 1.9.2 instead, but eventually Cantera needs to be patched to used the skipheader parameter instead

Nick

MortI80

unread,
Oct 7, 2015, 10:21:08 AM10/7/15
to Cantera Users' Group
Hi Nick, 

I would like to try that. How can I install numpy 1.9.2. via 'pip install...' or 'pip3 install...'?

The following does not work:

$ pip3 install numpy1.9.2

Collecting numpy1.9.2

  Could not find a version that satisfies the requirement numpy1.9.2 (from versions: )

No matching distribution found for numpy1.9.2

and 

$ pip3 install numpy 1.9.2

Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python3.5/site-packages

Collecting 1.9.2

  Could not find a version that satisfies the requirement 1.9.2 (from versions: )

No matching distribution found for 1.9.2 

Nick Curtis

unread,
Oct 7, 2015, 10:41:05 AM10/7/15
to Cantera Users' Group
pip install numpy==1.9.2 should do the trick!

Nick

Ray Speth

unread,
Oct 7, 2015, 2:18:04 PM10/7/15
to Cantera Users' Group
Hi,

(1) This issue should now be fixed in the 'master' branch of Cantera (which is what you're getting if you use brew with the '--HEAD' option) if you'd like to test it with the new Numpy version.

(2) To reiterate the importance of including detailed log files from the start, you may note that this issue had nothing to do with OS X El Capitan or Python 3.5, but instead the new Numpy version which was released two days ago.

Regards,
Ray

MortI80

unread,
Oct 8, 2015, 5:08:42 AM10/8/15
to Cantera Users' Group
Hi,

thanks Ray for the information about the new Numpy version. However, I cannot install numpy for python3 without errors. 

So, what did I do: to get a new, fresh installation I first removed all installed packages using "pip3 uninstall" and "pip uninstall". After that I also uninstalled hombrew and moved my python2.7 and python3.5 folders into the bin. Then I followed the before mentioned instructions from the Cantera 2.2.0 documentation. Everything worked fine till I wanted to install numpy via pip3. 

$ pip3 install numpy


Collecting numpy

 Using cached numpy-1.10.0.post2.tar.gz

Building wheels for collected packages: numpy

 Running setup.py bdist_wheel for numpy

 Stored in directory: /Users/XXX/Library/Caches/pip/wheels/03/0e/e4/e3ba93fd71c3d129e7e4ea13c503b07f9c37e8114c47903edf

Successfully built numpy

Installing collected packages: numpy

Exception:

Traceback (most recent call last):

 File "/usr/local/lib/python3.5/site-packages/pip/basecommand.py", line 211, in main

   status = self.run(options, args)

 File "/usr/local/lib/python3.5/site-packages/pip/commands/install.py", line 311, in run

   root=options.root_path,

 File "/usr/local/lib/python3.5/site-packages/pip/req/req_set.py", line 646, in install

   **kwargs

 File "/usr/local/lib/python3.5/site-packages/pip/req/req_install.py", line 803, in install

   self.move_wheel_files(self.source_dir, root=root)

 File "/usr/local/lib/python3.5/site-packages/pip/req/req_install.py", line 998, in move_wheel_files

   isolated=self.isolated,

 File "/usr/local/lib/python3.5/site-packages/pip/wheel.py", line 371, in move_wheel_files

   clobber(source, dest, False, fixer=fixer, filter=filter)

 File "/usr/local/lib/python3.5/site-packages/pip/wheel.py", line 317, in clobber

   shutil.copyfile(srcfile, destfile)

 File "/usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 115, in copyfile

   with open(dst, 'wb') as fdst:

PermissionError: [Errno 13] Permission denied: '/usr/local/bin/f2py3.5'


Ok, everything worked fine with pip numpy but not with pip, so I try to install cantera without python3 support:

$ brew install cantera --with-graphviz --HEAD

==> Installing cantera from homebrew/homebrew-science

==> Installing dependencies for homebrew/science/cantera: libpng, graphviz

==> Installing homebrew/science/cantera dependency: libpng

==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.18.el_capitan.bottle.tar.gz

######################################################################## 100,0%

==> Pouring libpng-1.6.18.el_capitan.bottle.tar.gz

🍺  /usr/local/Cellar/libpng/1.6.18: 17 files, 1,2M

==> Installing homebrew/science/cantera dependency: graphviz

==> Downloading https://homebrew.bintray.com/bottles/graphviz-2.38.0.el_capitan.bottle.1.tar.gz

######################################################################## 100,0%

==> Pouring graphviz-2.38.0.el_capitan.bottle.1.tar.gz

🍺  /usr/local/Cellar/graphviz/2.38.0: 469 files, 68M

==> Installing homebrew/science/cantera

==> Cloning https://github.com/cantera/cantera.git

Cloning into '/Library/Caches/Homebrew/cantera--git'...

remote: Counting objects: 2050, done.

remote: Compressing objects: 100% (1667/1667), done.

remote: Total 2050 (delta 507), reused 704 (delta 348), pack-reused 0

Receiving objects: 100% (2050/2050), 3.67 MiB | 1.27 MiB/s, done.

Resolving deltas: 100% (507/507), done.

Checking connectivity... done.

==> Checking out branch master

==> Downloading https://pypi.python.org/packages/source/C/Cython/cython-0.22.tar.gz

######################################################################## 100,0%

==> python -c import setuptools... --no-user-cfg install --prefix=/private/tmp/cantera20151008-74155-hcluxe/cython --single-version-externally-managed --record=installed.txt

==> /usr/local/opt/scons/bin/scons build prefix=/usr/local/Cellar/cantera/HEAD python_package=full CC=/usr/bin/clang CXX=/usr/bin/clang++ f90_interface=n python3_package=n

==> /usr/local/opt/scons/bin/scons test

Last 15 lines from /Users/XXX/Library/Logs/Homebrew/cantera/03.scons:

/usr/bin/clang++ -o test_problems/cathermo/DH_graph_1/DH_graph_1 test_problems/cathermo/DH_graph_1/DH_graph_1.o -Lbuild/lib -lcantera -lsundials_cvodes -lsundials_ida -lsundials_nvecserial -framework Accelerate

* Running test 'DH_graph_dilute'...

Comparing 'DH_NaCl_dilute_blessed.csv' with 'DH_NaCl_dilute_output.csv'

scons: *** [test_problems/cathermo/DH_graph_1/.passed-DH_graph_dilute] TypeError : genfromtxt() got an unexpected keyword argument 'skiprows'

Traceback (most recent call last):

 File "/usr/local/Cellar/scons/2.3.6/libexec/scons-local/SCons/Action.py", line 1063, in execute

   result = self.execfunction(target=target, source=rsources, env=env)

 File "/private/tmp/cantera20151008-74155-hcluxe/site_scons/buildutils.py", line 162, in regression_test

   d = compareFiles(env, pjoin(dir, blessed), pjoin(dir, output))

 File "/private/tmp/cantera20151008-74155-hcluxe/site_scons/buildutils.py", line 186, in compareFiles

   return compareCsvFiles(env, file1, file2)

 File "/private/tmp/cantera20151008-74155-hcluxe/site_scons/buildutils.py", line 336, in compareCsvFiles

   data1 = np.genfromtxt(file1, skiprows=headerRows, delimiter=',')

TypeError: genfromtxt() got an unexpected keyword argument 'skiprows'

scons: building terminated because of errors.

READ THIS: https://git.io/brew-troubleshooting

If reporting this issue please do so at (not Homebrew/homebrew):

 https://github.com/homebrew/homebrew-science/issues


Hm.... what did I wrong?

Ray Speth

unread,
Oct 8, 2015, 1:47:04 PM10/8/15
to Cantera Users' Group
Hi,

I added another commit which I think should fix the remaining issue with the test suite, if you would like to try it.

The permissions error with pip can probably be resolved by running pip with sudo.

Regards,
Ray

MortI80

unread,
Oct 9, 2015, 6:55:37 AM10/9/15
to Cantera Users' Group
Hi Ray, hi Nick,

due to the fact that some other things also didn't work on my el capitan installation I went back to a backup with yosemite and a running cantera installation. I will try to install a new version of cantera in a virtual machine to test your changes after I installed it. Since I am pretty busy I will come back to this discussion when I find the time. So, please do not wonder why I am not posting new things. Thanks already for your help and all the changes.

Best regards

MortI80

unread,
Oct 12, 2015, 5:33:48 AM10/12/15
to Cantera Users' Group
Hi Ray, hi Nick,

I installed el capitan now on a virtual machine via Parallels and followed the normal installation routine. Everything worked fine till I tried to install cantera:

$ brew install cantera --HEAD --python3

==> Installing cantera from homebrew/homebrew-science

cantera: Unsatisfied dependency: numpy

Homebrew does not provide Python dependencies; install with:

  pip install numpy

Error: An unsatisfied requirement failed this build.


But I did install numpy just in the command I have used before. Here is the previous output:


$ pip3 install numpy cython

Collecting numpy

  Downloading numpy-1.10.0.post2.tar.gz (4.1MB)

    100% |████████████████████████████████| 4.1MB 146kB/s 

Collecting cython

  Downloading Cython-0.23.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.6MB)

    100% |████████████████████████████████| 3.6MB 161kB/s 

Building wheels for collected packages: numpy

  Running setup.py bdist_wheel for numpy

  Stored in directory: /Users/XXX/Library/Caches/pip/wheels/03/0e/e4/e3ba93fd71c3d129e7e4ea13c503b07f9c37e8114c47903edf

Successfully built numpy

Installing collected packages: numpy, cython

Successfully installed cython-0.23.4 numpy-1.10.0.post2


So, I tried to install numpy again:

$ pip3 install numpy

Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python3.5/site-packages


and

$ pip install numpy

Collecting numpy

  Using cached numpy-1.10.0.post2.tar.gz

Building wheels for collected packages: numpy

  Running setup.py bdist_wheel for numpy

  Stored in directory: /Users/XXX/Library/Caches/pip/wheels/03/0e/e4/e3ba93fd71c3d129e7e4ea13c503b07f9c37e8114c47903edf

Successfully built numpy

Installing collected packages: numpy

Successfully installed numpy-1.10.0.post2


after that I tried to install cantere again:

$ brew install cantera --HEAD --python3

==> Installing cantera from homebrew/homebrew-science

Cloning into '/Library/Caches/Homebrew/cantera--git'...

remote: Counting objects: 2050, done.

remote: Compressing objects: 100% (1667/1667), done.

remote: Total 2050 (delta 507), reused 710 (delta 348), pack-reused 0

Receiving objects: 100% (2050/2050), 3.67 MiB | 870.00 KiB/s, done.

Resolving deltas: 100% (507/507), done.

Checking connectivity... done.

==> Checking out branch master

==> Downloading https://pypi.python.org/packages/source/C/Cython/cython-0.22.tar.gz

######################################################################## 100,0%

==> python -c import setuptools... --no-user-cfg install --prefix=/private/tmp/cantera20151012-2570

==> /usr/local/opt/scons/bin/scons build prefix=/usr/local/Cellar/cantera/HEAD python_package=full 

==> /usr/local/opt/scons/bin/scons test

==> /usr/local/opt/scons/bin/scons install

🍺  /usr/local/Cellar/cantera/HEAD: 603 files, 137M, built in 5.4 minutes

 
Now, the installation worked, but I cannot find cantera in my "/site-packages"-folders of /usr/local/lib/python2.7 or /usr/local/lib/python3.5. I can just find a parallel allias of python: /usr/local/lib/python  which points to my local cellar:
/usr/local/Cellar/cantera/HEAD/lib/python/site-packages/cantera
and 
/usr/local/Cellar/cantera/HEAD/lib/python/site-packages/Cantera-2.2.0-py2.7.egg-info

The verbose output is enclosed. The commands "brew doctor" and "brew tap --repair" do not change anything.

Verbose_Output_installing_cantera.rtf

Bryan W. Weber

unread,
Oct 12, 2015, 10:18:31 AM10/12/15
to Cantera Users' Group
Hi,

Obviously, the install failed the first time because you need numpy in both Python 2 and 3. Once you installed numpy in Python 2, it looks like the install worked properly. Although I have no experience with Mac, that output looks like its all correct. Did you test whether you could import Cantera?

python3 -c "import cantera; print(cantera.__version__)"

or

python -c "import cantera; print cantera.__version__"

should show the proper Cantera version (2.2.0 right now).

Regards,
Bryan

MortI80

unread,
Oct 13, 2015, 7:07:04 AM10/13/15
to Cantera Users' Group
Well, this is the output:

$ python3 -c "import cantera; print(cantera.__version__)"

Traceback (most recent call last):

  File "<string>", line 1, in <module>

ImportError: No module named 'cantera'


$ python -c "import cantera; print cantera.__version__"

Traceback (most recent call last):

  File "<string>", line 1, in <module>

ImportError: No module named cantera


So, cantera is  not installed or not installed in the right directory. May it be possible to link it via an alias? Probably not, because the syntax of python3 and python is different.

Ray Speth

unread,
Oct 13, 2015, 12:54:55 PM10/13/15
to Cantera Users' Group
Hi,

What is the output of 'brew info cantera'? My guess is that it is installed but not linked. I'm not sure why that would happen, as I thought 'brew install' implied 'brew link', but you can try running 'brew link cantera' to see if that fixes the problem. If that doesn't work, what is the output of 'find /usr/local -name onedim.py'?

Regards,
Ray

MortI80

unread,
Oct 14, 2015, 4:45:45 AM10/14/15
to Cantera Users' Group
Hi Ray,

here are my outputs:

$ brew info cantera

homebrew/science/cantera: stable 2.2.0, HEAD

/usr/local/Cellar/cantera/HEAD (603 files, 137M) *

  Built from source

==> Dependencies

Build: scons

Recommended: sundials

Optional: graphviz

==> Options

--with-graphviz

Build with graphviz support

--with-matlab=

Path to Matlab root directory

--with-python3

Build with python3 support

--without-check

Disable build-time checking (not recommended)

--without-sundials

Build without sundials support

--HEAD

Install HEAD version


"$ brew link cantera" did not change anything:
$ brew link cantera

Warning: Already linked: /usr/local/Cellar/cantera/HEAD

To relink: brew unlink cantera && brew link cantera


Following your instruction

$ find /usr/local -name onedim.py

/usr/local/Cellar/cantera/HEAD/lib/python/site-packages/cantera/onedim.py


So, cantera exists. I checked my installation on yosemite and there cantera is installed in the following folder:
/usr/local/Cellar/cantera/2.1.2/lib/
going to this path and listing everything shows 

$ ls

cantera 

libcantera_shared.dylib 
 python2.7

libcantera.a 

pkgconfig

python3.4

 
in contrast to that cantera is installed on my el capitan installation in:
/usr/local/Cellar/cantera/HEAD/lib/
listing everything on this path shows:

$ls

libcantera.a

pkgconfig

libcantera_shared.dylib

python

 

Perhaps these additional information are helpful. I also tried to instal cantera again on my el capitan installation with different options. So, without "--python3", without the installation of python3 and all pip3 commands from the instruction. The result is always the same. So, even for python2.7 it does not work.


Ray Speth

unread,
Oct 15, 2015, 11:06:54 AM10/15/15
to Cantera Users' Group
Hi,

Did you try the suggested command ' brew unlink cantera && brew link cantera'? This should create symlinks between the files in /usr/local/Cellar and the directories that are on the library/include/python paths, e.g. /usr/local/lib/python2.7/site-packages.

Regards,
Ray 

MortI80

unread,
Oct 15, 2015, 11:13:59 AM10/15/15
to Cantera Users' Group
Yes, it did not change anything:

$ brew unlink cantera && brew link cantera

Unlinking /usr/local/Cellar/cantera/HEAD... 13 symlinks removed

Linking /usr/local/Cellar/cantera/HEAD... 13 symlinks created


Cantera is still just installed in the before mentioned HEAD-folder and not linked into the python2.7 or python3.5 site-package folders.... 

Ray Speth

unread,
Oct 15, 2015, 1:49:08 PM10/15/15
to Cantera Users' Group
Hi,

I see now that the problem is that the Python package is being installed into /usr/local/lib/python instead of /usr/local/lib/python2.7. I've managed to replicate the problem on an older version of OS X (10.9), so it doesn't seem to have anything specifically to do with El Capitan. I think it's associated with the recent move to using setuptools. You should be able to install the latest stable release (2.2.0) instead of the development version (i.e. leave off the --HEAD option when running 'brew install cantera') until this issue is resolved.

Regards,
Ray

MortI80

unread,
Oct 21, 2015, 5:57:23 AM10/21/15
to Cantera Users' Group
Hi Ray,

I tried to install cantera without the --HEAD option but it did not work:

1. Uninstalling the HEAD-version:

$ brew uninstall cantera

Uninstalling /usr/local/Cellar/cantera/HEAD... (603 files, 137M)


2. Installing without the --HEAD option: 

$ brew install cantera

==> Installing cantera from homebrew/homebrew-science

######################################################################## 100,0%

Already downloaded: /Library/Caches/Homebrew/cantera--Cython-0.22.tar.gz

==> python -c import setuptools... --no-user-cfg install --prefix=/private/tmp/c

==> /usr/local/opt/scons/bin/scons build prefix=/usr/local/Cellar/cantera/2.2.0 

==> /usr/local/opt/scons/bin/scons test

Last 15 lines from /Users/XXX/Library/Logs/Homebrew/cantera/03.scons:

/usr/bin/clang++ -o test_problems/cathermo/DH_graph_1/DH_graph_1 test_problems/cathermo/DH_graph_1/DH_graph_1.o -Lbuild/lib -lcantera -lsundials_cvodes -lsundials_ida -lsundials_nvecserial -framework Accelerate

* Running test 'DH_graph_dilute'...

Comparing 'DH_NaCl_dilute_blessed.csv' with 'DH_NaCl_dilute_output.csv'

scons: *** [test_problems/cathermo/DH_graph_1/.passed-DH_graph_dilute] TypeError : genfromtxt() got an unexpected keyword argument 'skiprows'

Traceback (most recent call last):

  File "/usr/local/Cellar/scons/2.4.0/libexec/scons-local/SCons/Action.py", line 1063, in execute

    result = self.execfunction(target=target, source=rsources, env=env)

  File "/private/tmp/cantera20151021-535-1t95xcb/cantera-2.2.0/site_scons/buildutils.py", line 161, in regression_test

    d = compareFiles(env, pjoin(dir, blessed), pjoin(dir, output))

  File "/private/tmp/cantera20151021-535-1t95xcb/cantera-2.2.0/site_scons/buildutils.py", line 185, in compareFiles

    return compareCsvFiles(env, file1, file2)

  File "/private/tmp/cantera20151021-535-1t95xcb/cantera-2.2.0/site_scons/buildutils.py", line 330, in compareCsvFiles

Ray Speth

unread,
Oct 21, 2015, 10:53:23 AM10/21/15
to Cantera Users' Group
Sorry, I forgot about the issue with the new version of Numpy. The only place the removed feature is used is in the test suite, which you can disable by installing with:

    brew install cantera --without-check

Regards,
Ray

MortI80

unread,
Oct 22, 2015, 7:21:53 AM10/22/15
to Cantera Users' Group
Hi Ray,


it worked!!! Thanks a lot for your help. The only thing that is important to be mentioned is that if someone wants to use python3 it is necessary to install cantera with the --with-python3 options:

brew install cantera --without-check --with-python3

Without this option cantera is just installed in the side-packages folder of the python2.7 module. I think that this should be mentioned in the installation guide on github. In addition to that: I think it should also be mentioned, that matplotlib should be installed to run the examples with all available options. 

But once again: Thanks a lot and I hope the installation will run with the --HEAD-version also soon. 

Cheers
Reply all
Reply to author
Forward
0 new messages