old_setup.py.error#

View page source

Error Messages During Installation#

get_cppad_mixed.sh#

On Mac OS the following error messages may appear while running bin/get_cppad_mixed.sh :

Java#

      To use javac command-line tool you need to install a JDK.

This indicates that you have not added the location where brew installs openjdk to you execution path. Try executing the command

      PATH="/usr/local/opt/openjdk/bin:$PATH"

cholmod.h#

      cannot find cholmod.h

The suitesparse package does not have pkg-config support, hence cppad_mixed searches a set of directories for cholmod.h (which is part of suitesparse). It you get this message, find out where cholmod.h is installed on your system and open an issue about this on the cppad_py issues page.


old_setup.py#

The following error messages may appear while running old_setup.py :

swig#

      FileNotFoundError: [Errno 2] No such file or directory: 'swig'

Try installing swig on you system.

cppad.pc, cppad_mixed.pc#

      Cannot find name.pc

where name is cppad or cppad_mixed. You probably did not set PKG_CONFIG_PATH correctly.

Fortify Source#

      #warning _FORTIFY_SOURCE requires compiling with optimization

This is a problem with the python setuptools, one can un-define a macro, but it does not remove a original definition. It only happens when build_type to debug .

stdio.h#

      'stdio.h' file not found

This is a problem with the Mac system and the solutions keep changing; see stdio.h

If the solutions in the link above do not work and you are using brew, try using brew to install python3. Then add the location where brew installs python libraries to you execution path :

      minor=$(echo "import sys;print(sys.version_info.minor)" | python3)
      PATH="/usr/local/opt/python@3.$minor/bin:$PATH"

If your are using port , try the following :

      minor=$(echo "import sys;print(sys.version_info.minor)" | python3)
      "/opt/local/Library/Frameworks/Python.framework/Versions/3.$minor/bin:$PATH"

check_all.py#

The following error messages may appear while running python3 example/python/check_all.py :

numpy, scipy#

      module name has no attribute

where name is numpy or scipy. Try installing name using the command

      pip3 install name

cppad_py#

      ModuleNotFoundError: No module named cppad_py

This means that the cppad_py directory can’t be found. If you are testing the local copy, make sure that the directory

      top_src/cppad_py

exists; see local build . If you are testing the installed version, make sure the directory

      $PYTHONPATH/cppad_py

exists; see PYTHONPATH .

libcppad_lib#

      ImportError: libcppad_lib.socan not open shared object file

This means the CppAD library is not in your LD_LIBRARY_PATH . If you have a Mac, you will instead need to set DYLD_LIBRARY_PATH .