Last login: Wed Aug 15 18:31:40 on console
unknown68a86d4e0c2c:~ pessimisticoptimism$ curl -O http://python-distribute.org/distribute_setup.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16295 100 16295 0 0 3389 0 0:00:04 0:00:04 --:--:-- 5813
unknown68a86d4e0c2c:~ pessimisticoptimism$ python distribute_setup.py
Downloading #
Extracting in /var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpqkrkH0
Now working in /var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpqkrkH0/distribute-0.6.28
Installing Distribute
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Non-egg installation
Removing elements out of the way...
Renaming /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools-0.6c12dev_r85381-py2.7.egg-info into /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools-0.6c12dev_r85381-py2.7.egg-info.OLD.1345081179.88
Traceback (most recent call last):
File "setup.py", line 131, in <module>
_before_install()
File "/private/var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpqkrkH0/distribute-0.6.28/distribute_setup.py", line 363, in _before_install
_fake_setuptools()
File "/private/var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpqkrkH0/distribute-0.6.28/distribute_setup.py", line 420, in _fake_setuptools
res = _remove_flat_installation(setuptools_location)
File "/private/var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpqkrkH0/distribute-0.6.28/distribute_setup.py", line 224, in __no_sandbox
return function(*args, **kw)
File "/private/var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpqkrkH0/distribute-0.6.28/distribute_setup.py", line 279, in _remove_flat_installation
patched = _patch_egg_dir(pkg_info)
File "/private/var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpqkrkH0/distribute-0.6.28/distribute_setup.py", line 224, in __no_sandbox
return function(*args, **kw)
File "/private/var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpqkrkH0/distribute-0.6.28/distribute_setup.py", line 347, in _patch_egg_dir
_rename_path(path)
File "/private/var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpqkrkH0/distribute-0.6.28/distribute_setup.py", line 259, in _rename_path
os.rename(path, new_name)
OSError: [Errno 13] Permission denied
Something went wrong during the installation.
See the error message above.
unknown68a86d4e0c2c:~ pessimisticoptimism$ python3 distribute_setup.py
Extracting in /var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpdpzzpn
Now working in /var/folders/nf/kkw6hklx1zd2kpcmq5xvrxqw0000gn/T/tmpdpzzpn/distribute-0.6.28
Installing Distribute
creating build
creating build/src
creating build/src/docs
creating build/src/docs/_templates
creating build/src/docs/_theme
creating build/src/docs/_theme/nature
creating build/src/docs/_theme/nature/static
creating build/src/docs/build
creating build/src/docs/build/html
creating build/src/docs/build/html/_sources
creating build/src/docs/build/html/_static
creating build/src/setuptools
creating build/src/setuptools/command
creating build/src/setuptools/tests
creating build/src/setuptools/tests/indexes
creating build/src/setuptools/tests/indexes/test_links_priority
creating build/src/setuptools/tests/indexes/test_links_priority/simple
creating build/src/setuptools/tests/indexes/test_links_priority/simple/foobar
creating build/src/tests
creating build/src/tests/python3.3_bdist_egg_test
creating build/src/tests/shlib_test
copying setuptools/__init__.py -> build/src/setuptools
copying setuptools/archive_util.py -> build/src/setuptools
copying setuptools/depends.py -> build/src/setuptools
copying setuptools/dist.py -> build/src/setuptools
copying setuptools/extension.py -> build/src/setuptools
copying setuptools/package_index.py -> build/src/setuptools
copying setuptools/sandbox.py -> build/src/setuptools
copying setuptools/script template (dev).py -> build/src/setuptools
copying setuptools/script template.py -> build/src/setuptools
copying setuptools/tests/__init__.py -> build/src/setuptools/tests
copying setuptools/tests/doctest.py -> build/src/setuptools/tests
copying setuptools/tests/py26compat.py -> build/src/setuptools/tests
copying setuptools/tests/server.py -> build/src/setuptools/tests
copying setuptools/tests/test_bdist_egg.py -> build/src/setuptools/tests
copying setuptools/tests/test_build_ext.py -> build/src/setuptools/tests
copying setuptools/tests/test_develop.py -> build/src/setuptools/tests
copying setuptools/tests/test_dist_info.py -> build/src/setuptools/tests
copying setuptools/tests/test_easy_install.py -> build/src/setuptools/tests
copying setuptools/tests/test_packageindex.py -> build/src/setuptools/tests
copying setuptools/tests/test_resources.py -> build/src/setuptools/tests
copying setuptools/tests/test_sandbox.py -> build/src/setuptools/tests
copying setuptools/tests/test_upload_docs.py -> build/src/setuptools/tests
copying setuptools/command/__init__.py -> build/src/setuptools/command
copying setuptools/command/alias.py -> build/src/setuptools/command
copying setuptools/command/bdist_egg.py -> build/src/setuptools/command
copying setuptools/command/bdist_rpm.py -> build/src/setuptools/command
copying setuptools/command/bdist_wininst.py -> build/src/setuptools/command
copying setuptools/command/build_ext.py -> build/src/setuptools/command
copying setuptools/command/build_py.py -> build/src/setuptools/command
copying setuptools/command/develop.py -> build/src/setuptools/command
copying setuptools/command/easy_install.py -> build/src/setuptools/command
copying setuptools/command/egg_info.py -> build/src/setuptools/command
copying setuptools/command/install.py -> build/src/setuptools/command
copying setuptools/command/install_egg_info.py -> build/src/setuptools/command
copying setuptools/command/install_lib.py -> build/src/setuptools/command
copying setuptools/command/install_scripts.py -> build/src/setuptools/command
copying setuptools/command/register.py -> build/src/setuptools/command
copying setuptools/command/rotate.py -> build/src/setuptools/command
copying setuptools/command/saveopts.py -> build/src/setuptools/command
copying setuptools/command/sdist.py -> build/src/setuptools/command
copying setuptools/command/setopt.py -> build/src/setuptools/command
copying setuptools/command/test.py -> build/src/setuptools/command
copying setuptools/command/upload.py -> build/src/setuptools/command
copying setuptools/command/upload_docs.py -> build/src/setuptools/command
copying setuptools/tests/win_script_wrapper.txt -> build/src/setuptools/tests
copying setuptools/cli-32.exe -> build/src/setuptools
copying setuptools/cli-64.exe -> build/src/setuptools
copying setuptools/cli.exe -> build/src/setuptools
copying setuptools/gui-32.exe -> build/src/setuptools
copying setuptools/gui-64.exe -> build/src/setuptools
copying setuptools/gui.exe -> build/src/setuptools
copying tests/install_test.py -> build/src/tests
copying tests/manual_test.py -> build/src/tests
copying tests/test_distribute_setup.py -> build/src/tests
copying tests/test_python33_bdist_egg.py -> build/src/tests
copying tests/shlib_test/setup.py -> build/src/tests/shlib_test
copying tests/shlib_test/test_hello.py -> build/src/tests/shlib_test
copying tests/python3.3_bdist_egg_test/module.py -> build/src/tests/python3.3_bdist_egg_test
copying tests/python3.3_bdist_egg_test/setup.py -> build/src/tests/python3.3_bdist_egg_test
copying tests/shlib_test/hello.c -> build/src/tests/shlib_test
copying tests/shlib_test/hellolib.c -> build/src/tests/shlib_test
copying tests/shlib_test/hello.pyx -> build/src/tests/shlib_test
copying tests/api_tests.txt -> build/src/tests
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored build/src/tests/api_tests.txt
--- build/src/tests/api_tests.txt (original)
+++ build/src/tests/api_tests.txt (refactored)
@@ -39,7 +39,7 @@
>>> dist.py_version == sys.version[:3]
True
- >>> print dist.platform
+ >>> print(dist.platform)
None
Including various computed attributes::
@@ -199,7 +199,7 @@
You can ask a WorkingSet to ``find()`` a distribution matching a requirement::
>>> from pkg_resources import Requirement
- >>> print ws.find(Requirement.parse("Foo==1.0")) # no match, return None
+ >>> print(ws.find(Requirement.parse("Foo==1.0"))) # no match, return None
None
>>> ws.find(Requirement.parse("Bar==0.9")) # match, return distribution
@@ -211,7 +211,7 @@
>>> try:
... ws.find(Requirement.parse("Bar==1.0"))
... except VersionConflict:
- ... print 'ok'
+ ... print('ok')
ok
You can subscribe a callback function to receive notifications whenever a new
@@ -219,7 +219,7 @@
once for each existing distribution in the working set, and then is called
again for new distributions added thereafter::
- >>> def added(dist): print "Added", dist
+ >>> def added(dist): print("Added", dist)
>>> ws.subscribe(added)
Added Bar 0.9
>>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12")
RefactoringTool: Files that were modified:
RefactoringTool: build/src/tests/api_tests.txt
copying setuptools/tests/indexes/test_links_priority/external.html -> build/src/setuptools/tests/indexes/test_links_priority
copying setuptools/tests/indexes/test_links_priority/simple/foobar/index.html -> build/src/setuptools/tests/indexes/test_links_priority/simple/foobar
copying docs/conf.py -> build/src/docs
copying docs/easy_install.txt -> build/src/docs
copying docs/index.txt -> build/src/docs
copying docs/pkg_resources.txt -> build/src/docs
copying docs/python3.txt -> build/src/docs
copying docs/roadmap.txt -> build/src/docs
copying docs/setuptools.txt -> build/src/docs
copying docs/using.txt -> build/src/docs
copying docs/build/html/_sources/easy_install.txt -> build/src/docs/build/html/_sources
copying docs/build/html/_sources/index.txt -> build/src/docs/build/html/_sources
copying docs/build/html/_sources/pkg_resources.txt -> build/src/docs/build/html/_sources
copying docs/build/html/_sources/python3.txt -> build/src/docs/build/html/_sources
copying docs/build/html/_sources/roadmap.txt -> build/src/docs/build/html/_sources
copying docs/build/html/_sources/setuptools.txt -> build/src/docs/build/html/_sources
copying docs/build/html/_sources/using.txt -> build/src/docs/build/html/_sources
copying docs/_theme/nature/theme.conf -> build/src/docs/_theme/nature
copying docs/build/html/_static/basic.css -> build/src/docs/build/html/_static
copying docs/build/html/_static/nature.css -> build/src/docs/build/html/_static
copying docs/build/html/_static/pygments.css -> build/src/docs/build/html/_static
copying docs/_theme/nature/static/pygments.css -> build/src/docs/_theme/nature/static
copying docs/_theme/nature/static/nature.css_t -> build/src/docs/_theme/nature/static
copying docs/Makefile -> build/src/docs
copying docs/_templates/indexsidebar.html -> build/src/docs/_templates
copying distribute_setup.py -> build/src
copying easy_install.py -> build/src
copying pkg_resources.py -> build/src
copying release.py -> build/src
copying setup.py -> build/src
copying site.py -> build/src
copying CHANGES.txt -> build/src
copying CONTRIBUTORS.txt -> build/src
copying DEVGUIDE.txt -> build/src
copying README.txt -> build/src
copying MANIFEST.in -> build/src
copying launcher.c -> build/src
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages
Non-egg installation
Removing elements out of the way...
Already patched.
/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools-0.6c11-py3.2.egg-info already patched.
running install
running bdist_egg
running egg_info
writing distribute.egg-info/PKG-INFO
writing top-level names to distribute.egg-info/top_level.txt
writing dependency_links to distribute.egg-info/dependency_links.txt
writing entry points to distribute.egg-info/entry_points.txt
reading manifest file 'distribute.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'distribute.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-intel/egg
running install_lib
running build_py
creating build/lib
copying build/src/pkg_resources.py -> build/lib
copying build/src/easy_install.py -> build/lib
copying build/src/site.py -> build/lib
creating build/lib/setuptools
#
copying build/lib/site.py -> build/bdist.macosx-10.6-intel/egg
byte-compiling build/bdist.macosx-10.6-intel/egg/easy_install.py to easy_install.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/pkg_resources.py to pkg_resources.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/archive_util.py to archive_util.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/alias.py to alias.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/bdist_egg.py to bdist_egg.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/bdist_rpm.py to bdist_rpm.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/bdist_wininst.py to bdist_wininst.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/build_ext.py to build_ext.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/build_py.py to build_py.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/develop.py to develop.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py to easy_install.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/egg_info.py to egg_info.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/install.py to install.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/install_egg_info.py to install_egg_info.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/install_lib.py to install_lib.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/install_scripts.py to install_scripts.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/register.py to register.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/rotate.py to rotate.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/saveopts.py to saveopts.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/sdist.py to sdist.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/setopt.py to setopt.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/test.py to test.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/upload.py to upload.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/command/upload_docs.py to upload_docs.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/depends.py to depends.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/dist.py to dist.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/extension.py to extension.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/package_index.py to package_index.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/sandbox.py to sandbox.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/script template (dev).py to script template (dev).cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/script template.py to script template.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/doctest.py to doctest.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/py26compat.py to py26compat.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/server.py to server.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/test_bdist_egg.py to test_bdist_egg.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/test_build_ext.py to test_build_ext.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/test_develop.py to test_develop.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/test_dist_info.py to test_dist_info.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/test_easy_install.py to test_easy_install.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/test_packageindex.py to test_packageindex.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/test_resources.py to test_resources.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/test_sandbox.py to test_sandbox.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/setuptools/tests/test_upload_docs.py to test_upload_docs.cpython-32.pyc
byte-compiling build/bdist.macosx-10.6-intel/egg/site.py to site.cpython-32.pyc
creating build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying distribute.egg-info/PKG-INFO -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying distribute.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying distribute.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying distribute.egg-info/entry_points.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying distribute.egg-info/top_level.txt -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
copying distribute.egg-info/zip-safe -> build/bdist.macosx-10.6-intel/egg/EGG-INFO
creating dist
creating 'dist/distribute-0.6.28-py3.2.egg' and adding 'build/bdist.macosx-10.6-intel/egg' to it
removing 'build/bdist.macosx-10.6-intel/egg' (and everything under it)
Processing distribute-0.6.28-py3.2.egg
creating /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.28-py3.2.egg
Extracting distribute-0.6.28-py3.2.egg to /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages
Removing distribute 0.6.27 from easy-install.pth file
Adding distribute 0.6.28 to easy-install.pth file
Installing easy_install script to /Library/Frameworks/Python.framework/Versions/3.2/bin
Installing easy_install-3.2 script to /Library/Frameworks/Python.framework/Versions/3.2/bin
Installed /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.28-py3.2.egg
Processing dependencies for distribute==0.6.28
Finished processing dependencies for distribute==0.6.28
After install bootstrap.
/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools-0.6c11-py3.2.egg-info already exists
unknown68a86d4e0c2c:~ pessimisticoptimism$ easy_install pip
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-414.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
#
Please make the appropriate changes for your system and try again.
unknown68a86d4e0c2c:~ pessimisticoptimism$ pip install distribute
-bash: pip: command not found
unknown68a86d4e0c2c:~ pessimisticoptimism$ pip -U pyramid
-bash: pip: command not found
unknown68a86d4e0c2c:~ pessimisticoptimism$
以上是我在Mac OS X Lion上尝试安装Distribute和Pyramid的尝试。但没有成功,欢迎提供任何建议!
bin/pip
或者其他的bin/...
,也不必在虚拟环境中工作。这个想法是将虚拟环境放在某个地方,例如virtualenvwrapper提供了一些好用的命令。mkvirtualenv [name]
将会在配置时创建一个虚拟环境文件夹。然后使用workon [name]
来激活虚拟环境。激活虚拟环境时,虚拟环境路径被添加到$PATH
前面。换句话说,如果你执行which pip
命令,你会发现你没有使用系统范围的 pip,你的终端应该显示类似于([name]) george$
的东西。 - Loïc Faure-Lacroix