I am building h5py on Mac, following instructions "Building against Parallel HDF5" in this link: http://docs.h5py.org/en/latest/build.html
$ export CC=mpicc
$ python setup.py configure --mpi
$ sudo python setup.py build
I get this error:
h5py-2.5.0/h5py/api_compat.h:27:10: fatal error: 'hdf5.h' file not found
What should I do? If I need to install some dev version of HDF5, how can I do it on Mac?
I was getting this same error message yesterday, doing a general installation of HDF5 (not building against parallel). I was able to get around it by using Homebrew (a package manager for OS X that can be found here: http://brew.sh/).
Once you've installed Homebrew (if you don't already have it), the command is brew install hdf5.
You can find hdf5.h lib in your Unix and set in CPATH varible
freebsd 11 example:
>> find /usr -iname "*hdf5.h*"
<< /usr/local/include/hdf5.h
>> export CPATH="/usr/local/include/"
Then you can compile that you need
Related
I am trying to use Homebrew on Linux (Ubuntu 20.04) to install Swift Mint. I have installed swiftenv using Homebrew, and swift using swiftenv. In my .profile, I have included
export SWIFTENV_ROOT=/home/linuxbrew/.swiftenv
if which swiftenv > /dev/null; then eval "$(swiftenv init -)"; fi
to put swift in my PATH. Running echo $PATH gives
/home/linuxbrew/.swiftenv/shims:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/me/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
and which swift yields /home/linuxbrew/.swiftenv/shims/swift.
However, running brew install mint errors with
swift build --disable-sandbox -c release --arch arm64 --arch x86_64
make: swift: Command not found
make: *** [Makefile:18: build] Error 127
READ THIS: https://docs.brew.sh/Troubleshooting
To explore, I obtain a debug shell after the error with brew install --debug mint
In the debug shell, running echo $PATH gives
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super:/usr/bin:/bin:/usr/sbin:/sbin
and which swift turns up nothing.
What am I supposed to do to pass /home/linuxbrew/.swiftenv/shims into brew so that this package can build?
Ideally, the solution would allow me to run (the swiftenv part of) my .profile before building the formula so that I can avoid the possible fragility of swiftenv moving its shims directory.
i am using macOS arm, and install OpenCV for c++ using this command:
brew install --build-from-source OpenCV
download packages completed, and then i get this error:
==> Installing OpenCV
Error: An exception occurred within a child process:
RuntimeError: Unexpected architecture: arm64. This only works with Intel architecture.
can you help me?
This command should work as well.
brew install opencv
If this command shows any error you may share.
Clone sources
git clone https://github.com/opencv/opencv.git
Create build directory
mkdir -p build && cd build
Configure
cmake ../opencv
Build
cmake --build .
I'm trying to install lektor into a new virtualenv using pyenv virtualenv. I have no problem making a new virtualenv with Python 3.7.0, but when I try to pip install lektor, I get a build failure with watchdog and the following error message:
pyenv: clang: command not found
The `clang' command exists in these Python versions:
anaconda3-5.0.0
error: command 'clang' failed with exit status 127
I understand that the anaconda3 version has clang, but I also have a version installed in /usr/bin. The output of which -a clang is:
$PYENV_ROOT/shims/clang
/usr/bin/clang
Can I manually set the shim to point to usr/bin? Or is there a different solution to this issue?
This is a rotten solution, but it does work. By taking the shim for clang and temporarily moving it (e.g., mv $PYENV_ROOT/shims/clang ~/Desktop), watchdog can be installed, then the clang shim can be moved back to the original location. A better option would be for pyenv to default to the system versions of programs if a shim doesn't point anywhere in a given environment…
Alternative solution
The pyenv plugin pyenv-which-ext takes care of this class of issues by checking for the existence of utilities in the normal $PATH after seeing that they aren't present in the current environment. It's a quick install via Homebrew, took care of all my issues.
I've successfully installed unixODBC 2.3.4 on Mac OS X 10.12.6 (Sierra) but when I try to run pip install pyodbc I run into the following error:
ld: library not found for -lodbc
I assume that what it's looking for is libodbc.la that got installed with unixODBC:
test -z "/usr/local/lib" || .././install-sh -c -d "/usr/local/lib"
/bin/sh ../libtool --mode=install /usr/bin/install -c libodbc.la '/usr/local/lib'
Is this not what Pyodbc is looking for? How do I get it to find and use it successfully?
I've downloaded a copy of the Pyodbc source (version 4.0.17) and figured this out by examining its setup.py. It is indeed looking for unixODBC:
# The latest versions of OS X no longer ship with iodbc. Assume
# unixODBC for now.
settings['libraries'].append('odbc')
This causes ld to be called with -lodbc which looks for /lib/usr/libodbc.dylib. Unfortunately since El Capitan, normal installations go into /lib/local/usr.
What I did to fix this, then, is to add the following line in setup.py under the sys.platform == 'darwin': section:
# unixODBC make/install places libodbc.dylib in /usr/local/lib/ by default
# (also OS/X since El Capitan prevents /usr/lib from being accessed )
settings['library_dirs'] = [ '/usr/local/lib' ]
I can then install this with PIP from my local system like so:
$ sudo pip install /path/to/pyodbc-4.0.17/
I'll work on getting a patch made to Pyodbc but this gets me by in the meantime.
After installing python 2.7.13 version can't find run python, because python library not found :
then I tried install link with following line:
ln -s /opt/rh/python27/root/usr/bin/python2/libpython2.7.so.1.0 /lib64/libpython2.7.so.1.0
then try again, appears following error:
python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: Error 20
Then I reinstall all python libraries by this link: https://centos.pkgs.org/6/ius-i386/python27-libs-2.7.13-2.ius.centos6.i686.rpm.html
python via terminal works now, but then run bash script vi crontab not works, anybody know why?