Open tony-tian opened 6 years ago
It seems that your compiler is defaulting to gcc. Try clang:
CC=clang CXX=clang++ pip install git+https://github.com/teemupitkanen/mrpt/
thanks for reply! the command still not worked..
Running setup.py install for mrpt ... error
Complete output from command /Users/tianyizhuang/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/66/rk12_30x5dvbpg0pk_glwg2c0000gn/T/pip-1ligc2ie-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/66/rk12_30x5dvbpg0pk_glwg2c0000gn/T/pip-z3mysqps-record/install-record.txt --single-version-externally-managed --compile:
WARNING: '.' not a valid package name; please use only .-separated package names in setup.py
running install
running build
running build_py
package init file '__init__.py' not found (or not a regular file)
creating build
creating build/lib.macosx-10.7-x86_64-3.6
copying setup.py -> build/lib.macosx-10.7-x86_64-3.6
copying mrpt.py -> build/lib.macosx-10.7-x86_64-3.6
copying demo.py -> build/lib.macosx-10.7-x86_64-3.6
running build_ext
building 'mrptlib' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/cpp
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/tianyizhuang/anaconda/include -arch x86_64 -I/Users/tianyizhuang/anaconda/include -arch x86_64 -Icpp/lib -I/Users/tianyizhuang/anaconda/lib/python3.6/site-packages/numpy/core/include -I/Users/tianyizhuang/anaconda/include/python3.6m -c cpp/mrptmodule.cpp -o build/temp.macosx-10.7-x86_64-3.6/cpp/mrptmodule.o -std=c++11 -O3 -ffast-math -s -fno-rtti -fopenmp -DNDEBUG -march=native
clang-4.0: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
In file included from cpp/mrptmodule.cpp:6:
/Users/tianyizhuang/anaconda/include/python3.6m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/Users/tianyizhuang/anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/66/rk12_30x5dvbpg0pk_glwg2c0000gn/T/pip-1ligc2ie-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/66/rk12_30x5dvbpg0pk_glwg2c0000gn/T/pip-z3mysqps-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/66/rk12_30x5dvbpg0pk_glwg2c0000gn/T/pip-1ligc2ie-build/
Do you have Xcode Command Line Tools installed? Try
xcode-select --install
ensure the installation..still unable to install...but very thanks for help! still hope for further communication
Can you try what's suggested here, mainly the brew install python
part? If that doesn't work, try without using anaconda.
hard to work without anaconda...maybe I need to wait for further updates in order to get it working..thanks for the help and reply, and hope for any advice if available.
sir...now the question becomes:cpp/Mrpt.h:10:10: fatal error: 'random' file not found
..
after google it, I found bit of the question...seemed seldom happened..
do need your help,plz
Your compiler apparently doesn't have C++11 support. What version of clang are you using?
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Users/tianyizhuang/anaconda3/bin
I wonder the C++11 support have something wrong because only random package could not be found...
brew update brew install llvm
CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ CPATH=/usr/local/opt/llvm/include/c++/v1 pip install git+https://github.com/teemupitkanen/mrpt/
Thanks for taking the time to open source this great package!
after
brew install llvm
worked fine,pip install git+https://github.com/teemupitkanen/mrpt/
meet some problems...hope for your help