googlecl通过pip安装,可执行文件在哪里?

时间:2014-11-21 10:48:43

标签: python macos pip homebrew googlecl

我正在运行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

the README表示您可以这样调用它:

$ 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版本:

$ 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)

3 个答案:

答案 0 :(得分:2)

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

要确定这一点,您应该查看软件包的setup.py。这是here 如果查看脚本和变量SCRIPT_TO_INSTALL,您将看到主入口点不是二进制文件,而是src / google.py上的此脚本。

答案 1 :(得分:1)

在我的Ubuntu上它位于/usr/local/bin/google。尝试使用find find /usr -name google {{1}}。{/ 1}

答案 2 :(得分:0)

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