0

我正在运行 OS X 10.10,并googlecl通过以下方式安装pip

$ pip show googlecl
---
Name: googlecl
Version: 0.9.14
Location: /usr/local/lib/python2.7/site-packages
Requires: gdata

并且自述文件显示您可以这样称呼它:

$ google blogger post --title "foo" "command line posting"

所以我认为必须有一个google可执行文件,但没有。

如何运行 googlecl?

$ ls /usr/local/lib/python2.7/site-packages/googlecl/
total 280
drwxr-xr-x  21 root    admin   714B Oct 24 11:58 .
drwxr-xr-x  62 manuel  admin   2.1K Nov 21 11:20 ..
-rw-r--r--   1 root    admin   8.8K Feb 11  2013 __init__.py
-rw-r--r--   1 root    admin   8.4K Feb 11  2013 __init__.pyc
-rw-r--r--   1 root    admin   9.3K Feb 11  2013 authentication.py
-rw-r--r--   1 root    admin   9.0K Feb 11  2013 authentication.pyc
-rw-r--r--   1 root    admin    28K Feb 11  2013 base.py
-rw-r--r--   1 root    admin    25K Feb 11  2013 base.pyc
drwxr-xr-x   6 root    admin   204B Oct 24 11:58 blogger
drwxr-xr-x  10 root    admin   340B Oct 24 11:55 calendar
-rw-r--r--   1 root    admin   5.4K Feb 11  2013 client.py
-rw-r--r--   1 root    admin   4.4K Feb 11  2013 client.pyc
drwxr-xr-x   6 root    admin   204B Oct 24 12:00 config
drwxr-xr-x  10 root    admin   340B Oct 24 12:00 contacts
drwxr-xr-x  12 root    admin   408B Oct 24 12:04 discovery
drwxr-xr-x  10 root    admin   340B Oct 24 11:56 docs
drwxr-xr-x   6 root    admin   204B Oct 24 11:55 finance
drwxr-xr-x   6 root    admin   204B Oct 24 11:55 picasa
-rw-r--r--   1 root    admin   5.5K Feb 11  2013 service.py
-rw-r--r--   1 root    admin   4.9K Feb 11  2013 service.pyc
drwxr-xr-x   6 root    admin   204B Oct 24 11:58 youtube

Python是通过自制软件安装的:

$ brew info python
python: stable 2.7.8 (bottled), HEAD
https://www.python.org
/usr/local/Cellar/python/2.7.3 (5169 files, 79M)
/usr/local/Cellar/python/2.7.5 (4.0K)
  Built from source
/usr/local/Cellar/python/2.7.8_1 (4842 files, 77M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/python.rb
==> Dependencies
Build: pkg-config ✔
Required: openssl ✔
Recommended: readline ✔, sqlite ✘, gdbm ✔
==> Options
--quicktest
  Run `make quicktest` after the build (for devs; may fail)
--universal
  Build a universal binary
--with-brewed-tk
  Use Homebrew's Tk (has optional Cocoa and threads support)
--with-dtrace
  Experimental DTrace support (http://bugs.python.org/issue13405)
--with-poll
  Enable select.poll, which is not fully implemented on OS X (http://bugs.python.org/issue5154)
--without-gdbm
  Build without gdbm support
--without-readline
  Build without readline support
--without-sqlite
  Build without sqlite support
--HEAD
  install HEAD version
==> Caveats
Setuptools and Pip have been installed. To update them
  pip install --upgrade setuptools
  pip install --upgrade pip

You can install Python packages with
  pip install <package>

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See: https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python

.app bundles were installed.
Run `brew linkapps` to symlink these to /Applications.

点子版本:

$ pip --version
pip 1.5.6 from /usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg (python 2.7)
4

3 回答 3

2

您不会在每个 pip 安装中找到一个 bin。可以有一个可执行的脚本。

为了确定这一点,您应该查看包的 setup.py。它就在这里 如果您查看脚本和变量 SCRIPT_TO_INSTALL,您将看到主入口点不是二进制文件,而是位于 src/google.py 的此脚本。

于 2014-11-21T11:06:43.827 回答
1

在我的 Ubuntu 上,它位于/usr/local/bin/google. 尝试find使用find /usr -name google.

于 2014-11-21T10:53:29.943 回答
0

最后,重新安装googleclgoogle通过pip修复它并将可执行文件放入/usr/local/bin/google.

于 2014-11-24T13:13:47.920 回答