lines 515-668 of file: old_setup.py {xrst_begin old_setup.py.error} {xrst_spell cholmod config errno javac libcppad openjdk pc pkg scipy setuptools src stdio suitesparse sys un usr } 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 ==== | |tab| ``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 | |tab| ``PATH="/usr/local/opt/openjdk/bin:$PATH"`` cholmod.h ========= | |tab| ``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 ==== | |tab| ``FileNotFoundError: [Errno 2] No such file or directory: 'swig'`` Try installing `swig `_ on you system. cppad.pc, cppad_mixed.pc ======================== | |tab| ``Cannot find`` *name*\ ``.pc`` where *name* is ``cppad`` or ``cppad_mixed``. You probably did not set :ref:`PKG_CONFIG_PATH ` correctly. symbolic link ============= | |tab| ``build_type.sh:`` *prefix* ``is not a symbolic link`` where *prefix* is the :ref:`install_settings.py@cmake_install_prefix` in ``bin/get_cppad.sh``. Try removing the *prefix* directory and re-running old_setup.py. Fortify Source ============== | |tab| ``#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 :ref:`build_type` to ``debug`` . stdio.h ======= | |tab| ``'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 : | |tab| ``minor=$(echo "import sys;print(sys.version_info.minor)" | python3)`` | |tab| ``PATH="/usr/local/opt/python@3.$minor/bin:$PATH"`` If your are using ``port`` , try the following : | |tab| ``minor=$(echo "import sys;print(sys.version_info.minor)" | python3)`` | |tab| ``"/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 ============ | |tab| ``module`` *name* ``has no attribute`` ... where *name* is ``numpy`` or ``scipy``. Try installing *name* using the command | |tab| ``pip3 install`` *name* cppad_py ======== | |tab| ``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 | |tab| *top_src*\ ``/cppad_py`` exists; see :ref:`local build ` . If you are testing the installed version, make sure the directory | |tab| ``$PYTHONPATH/cppad_py`` exists; see :ref:`PYTHONPATH ` . libcppad_lib ============ | |tab| ``ImportError: libcppad_lib.so`` ... ``can not open shared object file`` This means the CppAD library is not in your :ref:`LD_LIBRARY_PATH` . If you have a Mac, you will instead need to set ``DYLD_LIBRARY_PATH`` . {xrst_end old_setup.py.error}