I'm trying to install python_qpid_proton on Mac OS X El Capitan and I'm having trouble getting it to find the SSL libraries when I actually make a connection.
When trying to use the library, I get this error attempting to connect using amqps:
proton.SSLUnavailable: amqps: SSL libraries not found
I've installed OpenSSL using the latest version of homebrew and have this in my .bashrc file:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
I've also tried rebuilding python_qpid_proton using both pip and the setup.py file and also examined the output from the setup.py install run to see if there was any sort of warning or error and did not see any.
I had a similar issue. Here's how I fixed it on my Mac OS Sierra. I guess you run into the same issue with El Capitan. By running the install in verbose mode I recognised missing dependencies. The following actions fixed it on my end:
Uninstall python-qpid-proton:
pip uninstall python-qpid-proton
Install missing dependencies (swig + pkg-config) via brew:
brew install swig
brew install pkg-config
Install python-qpid-proton and pip disable cache to force rebuild of lib:
export CFLAGS="-I/usr/local/opt/openssl/include"; pip install python-qpid-proton --verbose --no-cache-dir
In my case the solution was the following
pip uninstall python-qpid-proton
then install required
brew install swig
brew install pkg-config
and the setup flags:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
and finally compile as stated before:
export CFLAGS="-I/usr/local/opt/openssl/include"; pip install python-qpid-proton --verbose --no-cache-dir
Related
so I've been trying different methods to install TA-Lib, and found several different methods to install it, none of which have been easy, but even when TA-Lib is installed and appears on pip list, and even managed to install it on pipenv virtual environment, however if I actually want to go ahead and use it by typing
import talib
I get the following error:
ImportError: 2): Symbol not found: _TA_ACOS Referenced from: /Users/teo/.local/share/virtualenvs/trendingcoin-nriNAUCq/lib/python3.8/site-packages/talib/_ta_lib.cpython-38-darwin.so Expected in: flat namespace in /Users/teo/.local/share/virtualenvs/trendingcoin-nriNAUCq/lib/python3.8/site-packages/talib/_ta_lib.cpython-38-darwin.so
Now I would like you to know that I have tried many different methods to install it, they are detailed in this thread: Is it enough to install TA-Lib on Brew to use it? Pip throws me an error
As a wanna-be technical analyst, it would be sad if I can't use the infamous TA-Lib.
I was able to make it work following some of the steps in this github issue: https://github.com/mrjbq7/ta-lib/issues/381
$ arch -x86_64 brew install python#3.9
$ arch -x86_64 brew install ta-lib
$ arch -x86_64 brew link ta-lib
$ arch -x86_64 python3.9 -m pip install --no-cache-dir ta-lib
You'll need x86/brew and rosetta: https://stackoverflow.com/a/64997047/3090309
NOTE: In my case, I went though so many intents, that really made the difference to include the --no-cache-dir option.
The solution here seems to work:
https://github.com/mrjbq7/ta-lib/issues/408#issuecomment-839583759
$ conda install -c conda-forge ta-lib
Install ta-lib
brew install ta-lib
Find pip command for your environment
which -a pip
/home/<user>/.conda/envs/newenv/bin/pip <---------------
/usr/bin/pip
Install ta-lib wrapper via pip command
/home/<user>/.conda/envs/newenv/bin/pip install ta-lib
Here's what I did with my Mac M1:
# install python3.10
arch -arm64 brew install ta-lib
export TA_INCLUDE_PATH="$(brew --prefix ta-lib)/include"
export TA_LIBRARY_PATH="$(brew --prefix ta-lib)/lib"
arch -arm64 python -m pip install --no-cache-dir ta-lib
I'm trying to install h5py, but when I do pip install h5py or use python setup.py install from the source code, fatal error:
hdf5.h: No such file or directory.
Other posts mention to do pip install libhdf5-dev or pip install libhdf5-serial-dev to resolve this, but it says "no matching distribution found."
How can I install h5py? I am ssh'd into an Odyssey computer using the CentOS 6.5 version of the Linux. Also, I do not have sudo privileges. Thanks!
Your error is because you are missing the hdf5.h header, pip will not install the development headers, you need to install them using your package manager, on Centos it would be:
yum install hdf5-devel
If you look at the installation instrcutions:
Source installation on Linux and OS X
You need, via apt-get, yum or Homebrew:
Python 2.6, 2.7, 3.3, or 3.4 with development headers (python-dev or similar)
HDF5 1.8.4 or newer, shared library version with development headers (libhdf5-dev or similar)
NumPy 1.6.1 or later
This link helped:
https://github.com/Homebrew/legacy-homebrew/issues/23144
I installed LinuxHomeBrew and did:
brew tap homebrew/science
brew install hdf5
pip install h5py
I was able to install h5py!
sudo apt-get update
sudo apt-get install python-h5py
(Source)
Also, not pip install libhdf5-dev or pip install libhdf5-serial-dev, but apt install libhdf5-dev and apt install libhdf5-serial-dev.
Then, run pip install h5py
Running the below fixed my problem as I had an error related to xlocale.h
sudo ln -s /usr/include/locale.h /usr/include/xlocale.h
how do i install libicu-dev on mac. This is the instruction recommended on the documentation
sudo apt-get install python-numpy libicu-dev
http://polyglot.readthedocs.org/en/latest/Installation.html
I am using anaconda but it seems to always throw up an
In file included from _icu.cpp:27:
./common.h:86:10: fatal error: 'unicode/utypes.h' file not found
#include <unicode/utypes.h>
error
I just got PyICU to install on OSX, after it was failing due to that same error. Here is what I recommend:
Install homebrew (package manager for OSX)
brew install icu4c # Install the library; may be already installed
Verify that the necessary include directory is present: ls -l /usr/local/opt/icu4c/include/
If you do not have that directory, you may need to reinstall icu4u. I found that I had to do the following:
brew remove icu4c
brew install icu4c
Try to install polyglot to see if it can find icu4c: pip install polyglot
If that still complains, you can try specifying library location: CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip install polyglot
EDIT: There have been further changes. My current process for installing icu:
brew install icu4c
brew link icu4c --force
ICU_VERSION=<BREW_ICU_VERSION> CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip install pyicu
brew install icu4c
brew link icu4c --force
https://github.com/imojiengineering/node-icu-tokenizer
for me the simple answer with just brew install and linking does not work so I found the below solution to make it works:
1) install icu4c with brew:
brew install icu4c
2) check the version:
ls /usr/local/Cellar/icu4c/
it prompts something like:
59.1
3) execute bellow commands with substitution of proper version from previous step (first line only integer part, second and third line with decimal part):
export ICU_VERSION=59
export PYICU_INCLUDES=/usr/local/Cellar/icu4c/59.1/include
export PYICU_LFLAGS=-L/usr/local/Cellar/icu4c/59.1/lib
4) finally install python package for pyicu:
pip install pyicu
I just finished installing the latest stable version of python via Homebrew.
$ brew install python3
Everything works fine. I would like to install packages, for example PyMongo.
I don't have pip.
$ pip
-bash: pip: command not found
and there is no Homebrew formulae for it:
$ brew install PyMongo
brew install PyMongo
Error: No available formula for pymongo
Searching formulae...
Searching taps...
Any idea what's the best way to install PyMongo on OS X when Python was installed via Homebrew. Thank you!
Use pip3. The "caveats" text you see when you run brew info python3 was printed for you after python3 was installed; that text is frequently helpful! It reads:
You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.4/site-packages
Hello when I attempt to install pylibmc on OSX Lion using pip I get the following error:
./_pylibmcmodule.h:42:10: fatal error: 'libmemcached/memcached.h' file not found
#include <libmemcached/memcached.h>
^
1 error generated.
error: command 'clang' failed with exit status 1
Any clues at how to solve this issue?
libmemcached may also be installed using Homebrew.
brew install libmemcached
After that, pip install pylibmc worked for me without needing to specify any additional arguments.
It's in the libmemcached package. To install it using macports:
sudo port install libmemcached
Then, assuming you're using pip:
pip install pylibmc --install-option="--with-libmemcached=/opt/local"
or
LIBMEMCACHED=/opt/local pip install pylibmc
as explained in the pylibmc docs.
I solved this issue by checking where memcached is installed
$ which memcached
/usr/local/bin/memcached
and then setting LIBMEMCACHED environment variable before pip install:
$ export LIBMEMCACHED=/usr/local
$ pip install pylibmc
Answer for Ubuntu users:
sudo apt install libmemcached-dev zlib1g-dev
I have the same problem because i have installed MEMCACHED and not LIBMEMCACHED, so, to resolve:
brew uninstall memcached #to remove wrong package
brew install libmemcached #install correct lib
pip install pylibmc
Its Works for me!
: )
For those finding this answer on Fedora:
sudo yum install libmemcached-devel
Hit the same error with macOS High Sierra, Python3.6 installed with brew. Solution for me was to export these flags, mentioned in this comment: Error when install pylibmc using pip
export LDFLAGS="-L/usr/local/lib"
export CPPFLAGS="-I/usr/local/include"
After that, pip install run just fine.
i fixed this by installing memcached from port
you should install first macports from http://www.macports.org/
then run this command
sudo port install memcached
after that download the pylibmc from the pypi http://pypi.python.org/pypi/pylibmc
extract .tar.gz file then
python setup.py install --with-libmemcached=/opt/local
this code is worked for me
sudo apt-get install libmemcached-dev zlib1g-dev
LIBMEMCACHED=/opt/local pip install pylibmc
Sometimes the X-Code Command Line Tools need to be installed.
xcode-select -p