Hi,
I am trying to install Biogeme on some machines running Arch Linux. Note that I have the correct build environment setup on the computers. Based on the Python version, `pip install biogeme --verbose` or the better `python -m pip install biogeme verbose` fails in multiple ways:
Python 3.6.7 (created using `conda create -n py36biogeme python=3.6 pandas numpy unidecode cython scipy`) [Also same for Python 3.7.1]
Hangs, and when cancelled produces following traceback:
Traceback (most recent call last):
File "/home/kartik/miniconda3/envs/py36biogeme/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 179, in main
status = self.run(options, args)
File "/home/kartik/miniconda3/envs/py36biogeme/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 355, in run
session=session, autobuilding=True
File "/home/kartik/miniconda3/envs/py36biogeme/lib/python3.6/site-packages/pip/_internal/wheel.py", line 1051, in build
python_tag=python_tag,
File "/home/kartik/miniconda3/envs/py36biogeme/lib/python3.6/site-packages/pip/_internal/wheel.py", line 877, in _build_one
python_tag=python_tag)
File "/home/kartik/miniconda3/envs/py36biogeme/lib/python3.6/site-packages/pip/_internal/wheel.py", line 885, in _build_one_inside_env
wheel_path = builder(req, temp_dir.path, python_tag=python_tag)
File "/home/kartik/miniconda3/envs/py36biogeme/lib/python3.6/site-packages/pip/_internal/wheel.py", line 956, in _build_one_legacy
show_stdout=False, spinner=spinner)
File "/home/kartik/miniconda3/envs/py36biogeme/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 726, in call_subprocess
line = console_to_str(proc.stdout.readline())
It appears to wait for some `readline` from `stdout` which never comes.
Python 3.7.2 (created using `conda create -n py372biogeme python=3.7.2 pandas numpy unidecode cython scipy`)
Fails with the following compile errors:
/home/kartik/miniconda3/envs/py372biogeme/compiler_compat/ld: build/temp.linux-x86_64-3.7/src/cbiogeme.o: unable to initialize decompress status for section .debug_info
build/temp.linux-x86_64-3.7/src/cbiogeme.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1
error
Failed building wheel for biogeme
Cleaning up...
Removing source in /tmp/pip-install-hrkliprc/biogeme
Removed build tracker '/tmp/pip-req-tracker-mbbni0jw'
Command "/home/kartik/miniconda3/envs/py372biogeme/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-hrkliprc/biogeme/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-71d4roa_/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-hrkliprc/biogeme/
Exception information:
Traceback (most recent call last):
File "/home/kartik/miniconda3/envs/py372biogeme/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 179, in main
status = self.run(options, args)
File "/home/kartik/miniconda3/envs/py372biogeme/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 393, in run
use_user_site=options.use_user_site,
File "/home/kartik/miniconda3/envs/py372biogeme/lib/python3.7/site-packages/pip/_internal/req/__init__.py", line 57, in install_given_reqs
**kwargs
File "/home/kartik/miniconda3/envs/py372biogeme/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 945, in install
spinner=spinner,
File "/home/kartik/miniconda3/envs/py372biogeme/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 761, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/home/kartik/miniconda3/envs/py372biogeme/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-hrkliprc/biogeme/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-71d4roa_/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-hrkliprc/biogeme/
Further warnings are produced, mainly:
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isrc -I/home/kartik/miniconda3/envs/py372biogeme/lib/python3.7/site-packages/numpy/core/include -I/home/kartik/miniconda3/envs/py372biogeme/include/python3.7m -c src/bioExprLogLogit.cc -o build/temp.linux-x86_64-3.7/src/bioExprLogLogit.o -std=c++11 -Wall
Also, there is a NumPy deprecation warning:
/home/kartik/miniconda3/envs/py372biogeme/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
There is also a weird behavior: if I download the sources, and extract them, and run `python setup.py build` in either of the three environments, the above errors are still produced. However, Biogeme seems to be installed, but it runs from the directory where it was extracted. That is, I get a meaningful output upon running `import biogeme.version as ver`, and `print(ver.getText())`. The weirdness is because it was never successfully compiled.
Any help with this would be greatly appreciated.
Kartik.