Autokey won't start on Fedora 29 - kde-plasma

I've been trying to get autokey to work on a fresh install of Fedora 29. Every attempt to start the application was met with an error and the process would die.
encountered an uncaught pkg_resources.DistributionNotFound

The issue is that Fedora 29 uses python3 by default. When installing autokey-gtk and autokey-common, the following dependencies are pulled:
===================================================================================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================================================================================
Removing:
autokey-gtk noarch 0.95.2-1.fc29 #fedora 376 k
Removing unused dependencies:
autokey-common noarch 0.95.2-1.fc29 #fedora 554 k
gtksourceview2 x86_64 2.11.2-27.fc29 #fedora 3.4 M
pygtksourceview x86_64 2.10.1-18.fc29 #fedora 196 k
python3-xlib noarch 0.23-3.fc29 #fedora 881 k
wmctrl x86_64 1.07-25.fc29 #fedora 67 k
The gtksourceview is for python2 and not for python3 which won't allow autokey to open a window when trying to start. You will need to install gtksourceview3 separately to provide the proper libraries for autokey-gtk in python3.
# sudo dnf install gtksourceview3 -y

Related

Install Remi repository on CentOS Linux release 8.5.2111 (not CentOS 8 stream)

I want to update to PHP 8.1 in my old Centos 8.5.2111 server. But I'm unable to install Remi repository. I get the following:
othing provides (redhat-release >= 8.7 or centos-stream-release >= 8) needed by remi-release-8.7-2.el8.remi.noarch
[xxxxx#yyyy ~]$ cat /etc/redhat-release
CentOS Linux release 8.5.2111
[xxxxx#yyyy ~]$ sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-8.noarch.rpm
Last metadata expiration check: 0:36:51 ago on XXX yy Feb 2023 12:07:52 AM CET.
epel-release-latest-8.noarch.rpm 53 kB/s | 24 kB 00:00
epel-next-release-latest-8.noarch.rpm 30 kB/s | 11 kB 00:00
Package epel-release-8-18.el8.noarch is already installed.
Package epel-next-release-8-18.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[xxxxx#yyyy ~]$ sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
Last metadata expiration check: 0:37:07 ago on XXX yy Feb 2023 12:07:52 AM CET.
remi-release-8.rpm 247 kB/s | 31 kB 00:00
Error:
Problem: conflicting requests
- nothing provides (redhat-release >= 8.7 or centos-stream-release >= 8) needed by remi-release-8.7-2.el8.remi.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Maybe I missing something?
The message seems clear.
You need to update to the latest version of the OS, as explained in the FAQ. Older versions are insecure and unsupported, and their support in 3rd party repository is not sustainable.
You can choose to switch to
CentOS Stream 8, see https://www.centos.org/centos-stream/ with migration tools
RHEL 8.7, see https://www.redhat.com/en/blog/new-year-new-red-hat-enterprise-linux-programs-easier-ways-access-rhel
Alma Linux 8.7 see https://almalinux.org/ with migration tools
Rocky Linux 8.7 https://rockylinux.org/ with migration tools
Any other RHEL clone

Conda package bug? binary incompatability

I'm working in a remote Jupyter notebook on a system where I don't have root access, or even a shell in which to make many adjustments. I can retrieve packages from Conda's archive and run functions in notebook cells that install packages like this
!conda install /path/to/package-vvv.tar.bz2
I've run into situations where I guess wrong on the version number, install something that is incompatible. The error messages are like the one I produce below, binary incompatability in numpy or mkl.
Now I'm re-tracing problem on an Ubuntu 20.10 notebook where I have admin access. I have a reproducible problem to show and share.
Create an environment with same version of python, numpy and pandas, as we have on remote machine:
$ conda create -n cenv-py368 python=3.6.8 pandas=1.1.2 numpy=1.15.4
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.5.12
latest version: 4.9.2
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /home/pauljohn/LinuxDownloads/miniconda3/envs/cenv-py368
added / updated specs:
- numpy=1.15.4
- pandas=1.1.2
- python=3.6.8
The following packages will be downloaded:
package | build
---------------------------|-----------------
libffi-3.2.1 | hf484d3e_1007 52 KB
python-3.6.8 | h0371630_0 34.4 MB
libgcc-ng-9.1.0 | hdf63c60_0 8.1 MB
libstdcxx-ng-9.1.0 | hdf63c60_0 4.0 MB
blas-1.0 | mkl 6 KB
_libgcc_mutex-0.1 | main 3 KB
------------------------------------------------------------
Total: 46.6 MB
The following NEW packages will be INSTALLED:
_libgcc_mutex: 0.1-main
blas: 1.0-mkl
ca-certificates: 2021.1.19-h06a4308_0
certifi: 2020.12.5-py36h06a4308_0
intel-openmp: 2020.2-254
libedit: 3.1.20191231-h14c3975_1
libffi: 3.2.1-hf484d3e_1007
libgcc-ng: 9.1.0-hdf63c60_0
libgfortran-ng: 7.3.0-hdf63c60_0
libstdcxx-ng: 9.1.0-hdf63c60_0
mkl: 2020.2-256
mkl-service: 2.3.0-py36he8ac12f_0
mkl_fft: 1.2.0-py36h23d657b_0
mkl_random: 1.1.1-py36h0573a6f_0
ncurses: 6.2-he6710b0_1
numpy: 1.15.4-py36h7e9f1db_0
numpy-base: 1.15.4-py36hde5b4d6_0
openssl: 1.1.1i-h27cfd23_0
pandas: 1.1.2-py36he6710b0_0
pip: 20.3.3-py36h06a4308_0
python: 3.6.8-h0371630_0
python-dateutil: 2.8.1-pyhd3eb1b0_0
pytz: 2021.1-pyhd3eb1b0_0
readline: 7.0-h7b6447c_5
setuptools: 52.0.0-py36h06a4308_0
six: 1.15.0-pyhd3eb1b0_0
sqlite: 3.33.0-h62c20be_0
tk: 8.6.10-hbc83047_0
wheel: 0.36.2-pyhd3eb1b0_0
xz: 5.2.5-h7b6447c_0
zlib: 1.2.11-h7b6447c_3
Proceed ([y]/n)? y
Downloading and Extracting Packages
libffi-3.2.1 | 52 KB | ##################################### | 100%
python-3.6.8 | 34.4 MB | ##################################### | 100%
libgcc-ng-9.1.0 | 8.1 MB | ##################################### | 100%
libstdcxx-ng-9.1.0 | 4.0 MB | ##################################### | 100%
blas-1.0 | 6 KB | ##################################### | 100%
_libgcc_mutex-0.1 | 3 KB | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate cenv-py368
#
# To deactivate an active environment, use
#
# $ conda deactivate
activate that environment.
Install, for example, the package called "fastparquet":
(cenv-py368) $ conda install fastparquet
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.5.12
latest version: 4.9.2
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: /home/pauljohn/LinuxDownloads/miniconda3/envs/cenv-py368
added / updated specs:
- fastparquet
The following packages will be downloaded:
package | build
---------------------------|-----------------
pyparsing-2.4.7 | pyhd3eb1b0_0 59 KB
packaging-20.9 | pyhd3eb1b0_0 35 KB
------------------------------------------------------------
Total: 95 KB
The following NEW packages will be INSTALLED:
fastparquet: 0.5.0-py36h6323ea4_1
libllvm10: 10.0.1-hbcb73fb_5
llvmlite: 0.34.0-py36h269e1b5_4
numba: 0.51.2-py36h0573a6f_1
packaging: 20.9-pyhd3eb1b0_0
pyparsing: 2.4.7-pyhd3eb1b0_0
thrift: 0.11.0-py36hf484d3e_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
pyparsing-2.4.7 | 59 KB | ##################################### | 100%
packaging-20.9 | 35 KB | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Observe failure of import
(cenv-py368) $ python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fastparquet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pauljohn/LinuxDownloads/miniconda3/envs/cenv-py368/lib/python3.6/site-packages/fastparquet/__init__.py", line 5, in <module>
from .core import read_thrift
File "/home/pauljohn/LinuxDownloads/miniconda3/envs/cenv-py368/lib/python3.6/site-packages/fastparquet/core.py", line 9, in <module>
from . import encoding
File "/home/pauljohn/LinuxDownloads/miniconda3/envs/cenv-py368/lib/python3.6/site-packages/fastparquet/encoding.py", line 13, in <module>
from .speedups import unpack_byte_array
File "fastparquet/speedups.pyx", line 1, in init fastparquet.speedups
ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject
>>> AA
Do you agree I found a bug?
Seems like either Conda should work, or it should say there is no compatible version of fastparquet.
That error usually indicates that the NumPy is older than is compatible with the library that is using it, in this case fastparquet. Try updating the Python version to 3.7 or 3.8; Python 3.6 and NumPy 1.15 are not within the recommended versions today. (Updating Python to 3.7+ should also update NumPy; this is not usually done when you do conda update ...). Some recipes pin to >= some minimum version, this one did not seem to.
https://numpy.org/neps/nep-0029-deprecation_policy.html#support-table
It is a flaw in the preparation of some Python libraries you are importing. When the authors of a package like fastparquet do not correctly set the minimum compatible version of numpy or python for their package, the Conda environment reconciliation has no way to know that the package is incorrect. Conda offers up the package as a solution, although in fact it is not.
In a larger sense, this is a flaw in the way Conda finds compatible packages. Perhaps it is working as intended, so it is not a bug. But it is a flaw, in the sense that when the user pegs numpy=1.15, then the correct answer from Conda should be "there is no compatible package". However, because Conda relies on the version dependencies of contributed packages, it is not able to do so.
I've not encountered the same problem with packaging for RedHat or Debian Linux systems, they tend to report "nothing" rather than providing an inaccurate match.

How to fix Buildozer build fails with cmake error

I am trying to build a Kivy app with buildozer. I have upgraded to buildozer 0.39. The build fails with:
File "~/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /bin/rm -f CMakeCache.txt CMakeFiles/
STDOUT:
/bin/rm: cannot remove 'CMakeFiles/': Is a directory
I have installed cmake version 3.5.1
Edit 18 Apr 2019
cython version 0.21 installed.
I have uninstalled cmake and reinstalled version 3.14.2 using the instructions here.
I have deleted the .buildozer directory. When I now run buildozer I, get the issue:
RAN: ./autogen.sh
STDOUT:
./autogen.sh: 2: exec: autoreconf: not found
After
sudo apt install autoconf libtool
I now get the error:
STDOUT:
File "setup.py", line 159
print "--- using Tcl/Tk libraries at", TCL_ROOT
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("--- using Tcl/Tk libraries at", TCL_ROOT)?
Edit 19 Apr 2019
If I uninstall buildozer it appears to be python 2.7
/usr/local/lib/python2.7/dist-packages/buildozer-0.39.dist-info/*
I have installed buildozer from a directory where the python version is 2.7.12
How can I target buildozer to python 2.7?
How can I find out how it is targetted?
How can I use that information?
I have tried to use buildozer in virtualenv with python 3, but I get the same error.
I am lost. I have looked the Docker, but I have no idea how to install it or use it. Does it assume a working version of buildozer? What is it? Will it solve my problem?
Edit 21 Apr 2019
When I run
docker run --volume "$HOME/.buildozer":/home/user/.buildozer --volume "$PWD":/home/user/hostcwd kivy/buildozer --version
'Buildozer 0.40.dev0'.
However, when I try to run
docker run --volume "$HOME/.buildozer":/home/user/.buildozer --volume "$PWD":/home/user/hostcwd kivy/buildozer android debug
I get the error:
Rename /home/user/.buildozer/android/platform/android-ndk-r17c to /home/jeff/.buildozer/crystax-ndk/crystax-ndk-10.3.2 fails because /home/jeff/.buildozer/crystax-ndk/crystax-ndk-10.3.2 is not a directory
Edit 22 Apr 2019
I have now commented out
#android.ndk_path
from buildozer.spec
I now get the error:
Cwd /home/user/hostcwd/.buildozer/android/platform/python-for-android
Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=bfgApp --bootstrap=sdl2 --requirements=python2,kivy,pil,docutils,pathlib,html2rest --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/user/hostcwd/.buildozer/android/platform/build" --ndk-api=21
I deleted CMakeFiles dir of this package and rerun buildozer build and it passed though (in dir .buildozer/android/platform/build/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg)

Tensorflow compilation error with latest tensorflow source on MacOS

I am trying to build the tensorflow source on my Mac OSx Yosemite (10.10.5). After I run this command
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
I get this error
C++ compilation of rule '//tensorflow/core:candidate_sampling_ops_op_lib' failed: cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 95 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
tensorflow/core/ops/candidate_sampling_ops.cc:392:7: error: return type 'tensorflow::Status' must match previous return type 'const ::tensorflow::Status' when lambda expression has unspecified explicit return type
return Status::OK();
^
tensorflow/core/ops/candidate_sampling_ops.cc:376:17: error: no viable conversion from 'tensorflow::(lambda at tensorflow/core/ops/candidate_sampling_ops.cc:376:17)' to 'tensorflow::Status (*)(shape_inference::InferenceContext )'
.SetShapeFn([](InferenceContext c) {
What may I be doing wrong ?
(outdated but still relevant for this version of TF)
The latest version of tensorflow is NOT compileable/working for mac os x.
Here is my script to get tensorflow working on mac-osx sierra tensorflow 1.0 on mac-osx sierra i7 no gpu. I'm still working on getting SSE and such to compile correctly and a later version of tensorflow - but whatever. Tensorflow is not friently with macs - but DL4J is!
UPDATE:
You shouldn't need to update from Yosemite. I was able to get r1.3 to compile with SSE and AVX! So the 'latest release' at time of writing has known issues - r1.3 is the latest stable build. I've included the script to do a proper build below, but also including http://www.josephmiguel.com/building-tensorflow-1-3-from-source-on-mac-osx-sierra-macbook-pro-i7-with-sse-and-avx/ for all the details on the matter.
one time install
install anaconda3 pkg # manually download this and install the package
conda update conda
conda create -n dl python=3.6 anaconda
source activate dl
cd /
brew install bazel
pip install six numpy wheel
pip install –upgrade https://storage.googleapis.com/tensorflow/mac/cpu/protobuf-3.1.0-cp35-none-macosx_10_11_x86_64.whl
sudo -i
cd /
rm -rf tensorflow # if rerunning the script
cd /
git clone https://github.com/tensorflow/tensorflow
Step 1
cd /tensorflow
git checkout r1.3 -f
cd /
chmod -R 777 tensorflow
cd /tensorflow
./configure # accept all default settings
Step 2
// https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions
bazel build –config=opt –copt=-mavx –copt=-mavx2 –copt=-mfma //tensorflow/tools/pip_package:build_pip_package
Step 3
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
pip install /tmp/tensorflow_pkg/tensorflow-1.0.1-cp36-cp36m-macosx_10_7_x86_64.whl
Step 4
cd ~
ipython
Step 5
import tensorflow as tf
hello = tf.constant(‘Hello, TensorFlow!’)
sess = tf.Session()
print(sess.run(hello))
Step 6
pip uninstall /tmp/tensorflow_pkg/tensorflow-1.0.1-cp36-cp36m-macosx_10_7_x86_64.whl

Installing C SDK for couchbase, Mac OSX 10.6.8 -- How can I correct cmake errors?

I am trying to get couchbase up and running for python on Mac OSX 10.6.8. I'm following the instructions here:
http://docs.couchbase.com/couchbase-sdk-python-1.2/index.html#getting-started
But I'm stuck on step 2:
Download and install the C library.
According to the instructions for installing the C SDK here:
http://docs.couchbase.com/developer/c-2.4/download-install.html
I did this:
~$ brew update
....
....
~$ brew install libcouchbase
But I'm getting an error when homebrew tries to install the dependency cmake:
==> Installing libcouchbase dependency: cmake
==> Downloading http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-3.1.0.tar.gz
==> Patching
==> Downloading https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--sphinx-1.2.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--markupsafe-0.23.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--docutils-0.12.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--pygments-2.0.1.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> Downloading https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--jinja2-2.7.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-HcEaFf/cmake-3.1.0/sphinx --single-version-e
==> ./bootstrap --prefix=/Users/7stud/.homebrew/Cellar/cmake/3.1.0 --system-libs --parallel=2 --no-system-libarchiv
==> make
[ 34%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_write_set_options.c.o
[ 34%] Building C object Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/filter_fork_posix.c.o
Linking C static library libcmlibarchive.a
[ 34%] Built target cmlibarchive
make: *** [all] Error 2
READ THIS: http://git.io/brew-troubleshooting
These open issues may also help:
Fix LLVM CMake modules not being preprocessed (https://github.com/Homebrew/homebrew/pull/29976)
cmake builds fail on CLT-only with --env=std (https://github.com/Homebrew/homebrew/issues/29101)
More detail here:
~$ brew gist-logs --config --doctor cmake
https://gist.github.com/a37987f168d284128cfe
Anyone have any ideas on what I should do? Thanks.
Do you have the latest (available for 10.6.8) version of Xcode and its devtools? It appears to be an issue with GCC (I initially had issues with the LLVM gcc version Apple packages with Xcode).
Try brew install gcc (or brew reinstall gcc if you initially used brew to install gcc) and then run brew install make again.
I've got XCode version 3.2.6 installed, which I believe is the highest version compatible with OSX 10.6.8.
In the gist, whose link I posted, one of the errors is:
error: ncurses/ncurses.h: No such file or directory
I found ncurses.h on my system here:
/usr/include$ ls -al ncurses.h
lrwxr-xr-x 1 root wheel 8 Aug 11 2012 ncurses.h -> curses.h
...which if you note is not in a directory called ncurses(look at the prompt)--ncurses being the directory where the error message says ncurses.h should be. Also, note that ncurses.h is a link to another file: curses.h (see the arrow on the right?). So, I did this:
/usr/include$ sudo mkdir ncurses
Password:
/usr/include$ cd ncurses
/usr/include/ncurses$ sudo cp -av ../ncurses.h . (-a => copy link rather than the file it points to, -v => verbose, show what is being copied)
Password:
../ncurses.h -> ./ncurses.h
/usr/include/ncurses$ ls -al
total 8
drwxr-xr-x 3 root wheel 102 Dec 29 18:59 .
drwxr-xr-x 272 root wheel 9248 Dec 29 18:13 ..
lrwxr-xr-x 1 root wheel 8 Dec 29 18:59 ncurses.h -> curses.h
Then I tried installing libcouchbase again:
~$ brew install libcouchbase
==> Installing libcouchbase dependency: cmake
==> Downloading http://www.cmake.org/files/v3.1/cmake-3.1.0.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake-3.1.0.tar.gz
==> Patching
==> Downloading https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--jinja2-2.7.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.ta
Already downloaded: /Library/Caches/Homebrew/cmake--markupsafe-0.23.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--docutils-0.12.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.1.tar.g
Already downloaded: /Library/Caches/Homebrew/cmake--pygments-2.0.1.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> Downloading https://pypi.python.org/packages/source/S/Sphinx/Sphinx-1.2.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/cmake--sphinx-1.2.3.tar.gz
==> python -c import setuptools... install --prefix=/private/tmp/cmake-FqXEf3/cmake-3.1
==> ./bootstrap --prefix=/Users/7stud/.homebrew/Cellar/cmake/3.1.0 --system-libs --para
==> make
==> make install
/Users/7stud/.homebrew/Cellar/cmake/3.1.0: 1819 files, 33M, built in 18.5 minutes
==> Installing libcouchbase
==> Downloading http://packages.couchbase.com/clients/c/libcouchbase-2.4.5_1_gd7f6ecf.t
######################################################################## 100.0%
==> Patching
==> cmake .. -DCMAKE_INSTALL_PREFIX=/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_
==> make install
/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf: 53 files, 1.4M, built in 42 seconds
$
I didn't believe it, so I tried again:
~$ brew install libcouchbase
Warning: libcouchbase-2.4.5_1_gd7f6ecf already installed
~$ brew uninstall libcouchbase
Uninstalling /Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf...
~$ brew install libcouchbase
==> Downloading http://packages.couchbase.com/clients/c/libcouchbase-2.4.5_1_gd7f6ecf.t
Already downloaded: /Library/Caches/Homebrew/libcouchbase-2.4.5_1_gd7f6ecf.tar.gz
==> Patching
==> cmake .. -DCMAKE_INSTALL_PREFIX=/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_
==> make install
/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf: 53 files, 1.4M, built in 30 seconds
~$
Testing the install:
/usr/include/ncurses$ cbc version
cbc:
Runtime: Version=2.4.5_1_gd7f6ecf, Changeset=d7f6ecfa15e73c668a8f81947d9f85b654dcdbda
Headers: Version=2.4.5_1_gd7f6ecf, Changeset=d7f6ecfa15e73c668a8f81947d9f85b654dcdbda
IO: Default=libevent, Current=libevent
SSL: .. SUPPORTED
Python SDK
But then I was unable to install the Python SDK following the instructions here:
http://docs.couchbase.com/couchbase-sdk-python-1.2/
$ python -V
Python 2.7.9
I got to here:
5. Install the Python SDK. The easiest way to do this is via the pip tool:
shell> pip install couchbase --quiet
But this is what happened:
$ pip install couchbase --quiet
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-eflT9C-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Traceback (most recent call last): File
"/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 9,
in
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/init.py",
line 148, in main
return command.main(args[1:], options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/basecommand.py",
line 169, in main
text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 63: ordinal not in range(128)
Same thing here:
$ LC_ALL=C pip install couchbase --quiet
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-Oe6ydu-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Storing complete log in /Users/7stud/.pip/pip.log
/usr/include/ncurses$ pip install couchbase --quiet Command
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-GijsbQ-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Traceback (most recent call last): File
"/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 9,
in
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/init.py",
line 148, in main
return command.main(args[1:], options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg/pip/basecommand.py",
line 169, in main
text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 63: ordinal not in range(128)
I fixed the unicode error by patching the python source code:
#text = '\n'.join(complete_log)
#python 2.x patch found here: https://github.com/pypa/pip/issues/1137
text = '\n'.join(to_utf8(l) for l in complete_log)
But then I got this error:
$ pip install couchbase --quiet
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-c "import setuptools;file='/private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase/setup.py';exec(compile(open(file).read().replace('\r\n',
'\n'), file, 'exec'))" install --record
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip-AQtdf2-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-/pip_build_7stud/couchbase
Storing complete log in /Users/7stud/.pip/pip.log
$
(I just looked at the error log mentioned above: pip.log, and it says the error was a KeyboardInterrupt. Huh? So, I tried $ pip install couchbase --quiet again and it worked. Then, to test the install $ python -c 'import couchbase', and there were no errors! I don't know if the stuff I did below influenced anything.)
Next, I decided to try installing from source:
According to the README file:
~/Downloads/couchbase-1.2.4$ python setup.py build_ext --inplace
But that ended like this:
src/exceptions.c:136: error: too many arguments to function
‘pycbc_exc_map’ lipo: can't figure out the architecture type of:
/var/folders/++/++iEr0qoGaimgUBsnNcijk+++TI/-Tmp-//ccZekvJj.out error:
command 'gcc-4.2' failed with exit status 1
Next, I did this:
~/Downloads/couchbase-1.2.4$ python setup.py build_ext \
> --library-dir ~/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf/lib \
> --include-dir ~/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf/include
running build_ext building 'couchbase._libcouchbase' extension gcc-4.2
-fno-strict-aliasing -fno-common -dynamic -isysroot
...
...
intel-2.7/src/iops.o
build/temp.macosx-10.6-intel-2.7/src/connevents.o
build/temp.macosx-10.6-intel-2.7/src/pipeline.o
build/temp.macosx-10.6-intel-2.7/src/viewrow/viewrow.o
build/temp.macosx-10.6-intel-2.7/src/contrib/jsonsl/jsonsl.o
-L/Users/7stud/.homebrew/Cellar/libcouchbase/2.4.5_1_gd7f6ecf/lib -lcouchbase -o build/lib.macosx-10.6-intel-2.7/couchbase/_libcouchbase.so
...which ended without error. But testing the install failed:
~/Downloads/couchbase-1.2.4$ python -c 'import couchbase'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "couchbase/__init__.py", line 18, in <module>
from couchbase.connection import Connection
File "couchbase/connection.py", line 22, in <module>
import couchbase._bootstrap
File "couchbase/_bootstrap.py", line 34, in <module>
import couchbase.exceptions as E
File "couchbase/exceptions.py", line 18, in <module>
import couchbase._libcouchbase as C
ImportError: No module named _libcouchbase
So, I thought what the heck, I'll go ahead and try this:
~/Downloads/couchbase-1.2.4$ python setup.py install
...
...
Installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/couchbase-1.2.4-py2.7-macosx-10.6-intel.egg
Processing dependencies for couchbase==1.2.4
Finished processing dependencies for couchbase==1.2.4
But, I got the same import error when testing the install, so I gave up.
After reading the answer to my question, I did:
$ brew install gcc
but I didn't try to fix couchbase until now. I don't think installing gcc with homebrew did anything because I still get:
~$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc.
build 5666) (dot 3) Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
/usr/bin$ which gcc
/usr/bin/gcc
/usr/bin$ ls -al /usr/bin/gcc
lrwxr-xr-x 1 root wheel 7 Aug 11 2012 /usr/bin/gcc -> gcc-4.2
...which is the Apple version of gcc. But, when I installed gcc with homebrew I got the output:
/Users/7stud/.homebrew/Cellar/gcc/4.9.2_1: 1155 files, 200M, built in
106.8 minutes
...which is gcc version 4.9.