Giter Club home page Giter Club logo

Comments (12)

jamesp avatar jamesp commented on May 31, 2024 1

On Mac OSX 10.14.6 I had trouble installing in development mode:

    warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    In file included from hector/src/bc_component.cpp:15:
    In file included from hector/inst/include/bc_component.hpp:17:
    In file included from hector/inst/include/imodel_component.hpp:20:
    hector/inst/include/unitval.hpp:17:10: fatal error: 'sstream' file not found
    #include <sstream>
             ^~~~~~~~~
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------

I successfully installed with this command:

$ cd pyhector
$ CC="gcc -stdlib=libc++" pip install -e .

from pyhector.

rgieseke avatar rgieseke commented on May 31, 2024

Hi,

how did you install boost? Through Homebrew?

Maybe you can try installing Python3 through Homebrew as well? That's how I tested on OS X, I haven't tried with the built-in Python.

So

brew install python3

mkdir test

cd test

python3 -m venv venv

./venv/bin/pip install pip --upgrade

./venv/bin/pip install pyhector 

from pyhector.

russellhz avatar russellhz commented on May 31, 2024

Thanks for the quick response!

I installed boost through Homebrew.

Running your suggestion gave me the same error.

from pyhector.

rgieseke avatar rgieseke commented on May 31, 2024

In your screenshot it lists the OS X version as 10.6, is that right?

Can you give the version of clang?

clang --version

Can you maybe also try installing boost in explicit C++11 mode?

brew install boost --c++11

It might also be necessary to use a different compiler option in setup.py e.g. -stdlib=libc++, but I'm not expert here ...

from pyhector.

swillner avatar swillner commented on May 31, 2024

Hi,
Looks like this is an issue with the C++ Standard flag in Clang.
I hope it's working now...

from pyhector.

rgieseke avatar rgieseke commented on May 31, 2024

Thanks @swillner!
@russellhz to install and test the head version from master you would need to follow the Development instructions here:
https://github.com/openclimatedata/pyhector#development

from pyhector.

rgieseke avatar rgieseke commented on May 31, 2024

@russellhz Did you get a chance to try it again? We just published v0.6.0 with explicitly setting the C++ standard to 11, so you should be able to try with just

pip install pyhector

from pyhector.

russellhz avatar russellhz commented on May 31, 2024

@rgieseke I'm getting the same error messages.

This is my clang version.

screen shot 2017-04-24 at 9 05 26 am

from pyhector.

rgieseke avatar rgieseke commented on May 31, 2024

Thanks for the feedback, will try again on my Mac later ...

from pyhector.

rgieseke avatar rgieseke commented on May 31, 2024

What confuses me is that your first screen shot is showing macosx-10.6

When I do a fresh clone on my 10.11 machine:

git clone https://github.com/openclimatedata/pyhector.git --recursive

and then

python setup.py build_ext --inplace

I get

running build_ext
building 'libpyhector' extension
creating build/temp.macosx-10.11-intel-2.7/hector-wrapper
creating build/temp.macosx-10.11-intel-2.7/hector-wrapper/src
creating build/temp.macosx-10.11-intel-2.7/hector-wrapper/hector
creating build/temp.macosx-10.11-intel-2.7/hector-wrapper/hector/source
creating build/temp.macosx-10.11-intel-2.7/hector-wrapper/hector/source/core
creating build/temp.macosx-10.11-intel-2.7/hector-wrapper/hector/source/models
creating build/temp.macosx-10.11-intel-2.7/hector-wrapper/hector/source/components
creating build/temp.macosx-10.11-intel-2.7/hector-wrapper/hector/source/data
[...]

There are quite a few issues with compiling with Clang and older versions of OS X (see e.g. http://stackoverflow.com/questions/19774778/when-is-it-necessary-to-use-use-the-flag-stdlib-libstdc/19774902#19774902) and libc++ vs. libstdc++

Maybe your Python is older?

When you just start python, what does it display?

Mine shows

Python 2.7.13 (default, Apr  4 2017, 08:46:44) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin

from pyhector.

russellhz avatar russellhz commented on May 31, 2024

@rgieseke you figured it out.

I have multiple pythons installed on my machine. Home-brew installed one which displays:
screen shot 2017-04-24 at 2 10 04 pm

while my default python is:

screen shot 2017-04-24 at 2 10 20 pm

I was able to install pyhector into the Homebrew python. Thank you so much for your help!

Russell

from pyhector.

rgieseke avatar rgieseke commented on May 31, 2024

That's great to hear! I'll add a note that it might be advisable to use a Homebrew installed Python with a Homebrew installed boost library ...

from pyhector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.