Comments (12)
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.
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.
Thanks for the quick response!
I installed boost through Homebrew.
Running your suggestion gave me the same error.
from pyhector.
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.
Hi,
Looks like this is an issue with the C++ Standard flag in Clang.
I hope it's working now...
from pyhector.
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.
@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.
@rgieseke I'm getting the same error messages.
This is my clang version.
from pyhector.
Thanks for the feedback, will try again on my Mac later ...
from pyhector.
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.
@rgieseke you figured it out.
I have multiple pythons installed on my machine. Home-brew installed one which displays:
while my default python is:
I was able to install pyhector into the Homebrew python. Thank you so much for your help!
Russell
from pyhector.
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)
- Introducing new output variables sometimes errors HOT 2
- Check new Hector options HOT 1
- Contact Zenodo to merge dois HOT 4
- Hector-wrapper version number HOT 3
- Update notebook for 2.0
- Update to new Hector APIs HOT 1
- Drop support for Python 2.7 and 3.4 HOT 1
- Update to Hector 2.1 HOT 12
- Adjust scripts still using hectorwrapper HOT 5
- Fix deploy action HOT 1
- Update tests
- ._bindings in __ini__ file HOT 3
- Re-enable `__hector_version__`
- Update to 2.3.0
- Migrate GitHub actions to new format
- Problem with PyBind on ARM Mac OS 10.14 HOT 6
- Fix automatic release workflows HOT 1
- Fix Mybinder image creation
- Update endDate/startDate behaviour HOT 1
- Move emissions CSVs to scenario data directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyhector.