Python 3.2 and 2.7

539 views
Skip to first unread message

Padraic

unread,
Aug 2, 2011, 7:05:25 PM8/2/11
to nose-users
I have both python 3.2 and python 2.7 running on my system and am
trying to install nose for both so that I can test my installations of
numpy and scipy. The install for 2.7 has gone just fine, and I can
run the tests I want to run, but things are not so happy for 3.2.
When I issue the command "pip install nose" I get the following
results:

Requirement already satisfied (use --upgrade to upgrade): nose in /
Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages
Cleaning up...

This indicates to me that the install is only looking at 2.7 and a 3.2
version isn't being installed at all. On the other hand, when I look
in the site-packages directory for 3.2 I see a version of nose which
appears to be correct showing up: nose-1.1.2-py3.2.egg. Still, when I
go to run my numpy tests I get the following error:

Running unit tests for numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/
python3.2/site-packages/numpy/testing/nosetester.py", line 318, in
test
self._show_system_info()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/
python3.2/site-packages/numpy/testing/nosetester.py", line 187, in
_show_system_info
nose = import_nose()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/
python3.2/site-packages/numpy/testing/nosetester.py", line 56, in
import_nose
import nose
File "nose/__init__.py", line 1, in <module>
from nose.core import collector, main, run, run_exit, runmodule
File "nose/core.py", line 143
print "%s version %s" % (os.path.basename(sys.argv[0]),
__version__)
^
SyntaxError: invalid syntax

Clearly the syntax in line 143 isn't python3 compatible as print
statements in 3 are formed like any other function (i.e. require
parentheses around the arguments). That implies that the version of
nose in my 3.2 directory isn't the right one. Any idea how to fix
that?

Kumar McMillan

unread,
Aug 3, 2011, 12:39:02 PM8/3/11
to nose-...@googlegroups.com
On Tue, Aug 2, 2011 at 6:05 PM, Padraic <R.Spr...@umit.maine.edu> wrote:
> I have both python 3.2 and python 2.7 running on my system and am
> trying to install nose for both so that I can test my installations of
> numpy and scipy.  The install for 2.7 has gone just fine, and I can
> run the tests I want to run, but things are not so happy for 3.2.
> When I issue the command "pip install nose" I get the following
> results:

Hi.

When we added Python 3 support to Nose, pip did not yet support Python
3. I just tried this in a 3.2 virtualenv using pip 1.0.6 and it
installed fine and I could import nose without import errors. What
versions are you using?

Did you try installing Nose with distribute installed as python3.2
setup.py install ?
http://readthedocs.org/docs/nose/en/latest/#python3
This converts the source using 2to3 but it should work with pip too as
long as you have distribute.

> --
> You received this message because you are subscribed to the Google Groups "nose-users" group.
> To post to this group, send email to nose-...@googlegroups.com.
> To unsubscribe from this group, send email to nose-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nose-users?hl=en.
>
>

R. Padraic Springuel

unread,
Aug 4, 2011, 11:33:46 AM8/4/11
to nose-...@googlegroups.com
Typing pip --version on the command line yields the following results:
pip 1.0.2 from
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg
(python 2.7)

This might explain the problem, as that's clearly no associated with
python 2.7, no 3.2. Furthermore, looking into my two site-pakages
folders confirmed that a version of pip existed in python 2.7's folder,
but not 3.2's. I've fixed that by redownloading pip and building and
installing it with python 3.2, but this doesn't change the results of
pip --version, nor the results of pip install nose (it still only looks
at the 2.7 folder, not the 3.2 folder).

I've tried building and installing nose from source the "old-fashioned"
way with nose 1.1.2 and that results in the import error I quoted in my
previous message (indeed, I may have tried that before composing that
email, which might explain why I got a message from pip that said it
didn't need to install anything but there was still a version of nose in
the site-packages folder).

I also tried with nose version 1.0.0 (after removing 1.1.2) and got the
same results.

Here are the build results for 1.1.2:
> running build
> running build_py
> creating build
> creating build/lib
> creating build/lib/nose
> copying nose/__init__.py -> build/lib/nose
> copying nose/case.py -> build/lib/nose
> copying nose/commands.py -> build/lib/nose
> copying nose/config.py -> build/lib/nose
> copying nose/core.py -> build/lib/nose
> copying nose/exc.py -> build/lib/nose
> copying nose/failure.py -> build/lib/nose
> copying nose/importer.py -> build/lib/nose
> copying nose/inspector.py -> build/lib/nose
> copying nose/loader.py -> build/lib/nose
> copying nose/proxy.py -> build/lib/nose
> copying nose/pyversion.py -> build/lib/nose
> copying nose/result.py -> build/lib/nose
> copying nose/selector.py -> build/lib/nose
> copying nose/suite.py -> build/lib/nose
> copying nose/tools.py -> build/lib/nose
> copying nose/twistedtools.py -> build/lib/nose
> copying nose/util.py -> build/lib/nose
> creating build/lib/nose/ext
> copying nose/ext/__init__.py -> build/lib/nose/ext
> copying nose/ext/dtcompat.py -> build/lib/nose/ext
> creating build/lib/nose/plugins
> copying nose/plugins/__init__.py -> build/lib/nose/plugins
> copying nose/plugins/allmodules.py -> build/lib/nose/plugins
> copying nose/plugins/attrib.py -> build/lib/nose/plugins
> copying nose/plugins/base.py -> build/lib/nose/plugins
> copying nose/plugins/builtin.py -> build/lib/nose/plugins
> copying nose/plugins/capture.py -> build/lib/nose/plugins
> copying nose/plugins/collect.py -> build/lib/nose/plugins
> copying nose/plugins/cover.py -> build/lib/nose/plugins
> copying nose/plugins/debug.py -> build/lib/nose/plugins
> copying nose/plugins/deprecated.py -> build/lib/nose/plugins
> copying nose/plugins/doctests.py -> build/lib/nose/plugins
> copying nose/plugins/errorclass.py -> build/lib/nose/plugins
> copying nose/plugins/failuredetail.py -> build/lib/nose/plugins
> copying nose/plugins/isolate.py -> build/lib/nose/plugins
> copying nose/plugins/logcapture.py -> build/lib/nose/plugins
> copying nose/plugins/manager.py -> build/lib/nose/plugins
> copying nose/plugins/multiprocess.py -> build/lib/nose/plugins
> copying nose/plugins/plugintest.py -> build/lib/nose/plugins
> copying nose/plugins/prof.py -> build/lib/nose/plugins
> copying nose/plugins/skip.py -> build/lib/nose/plugins
> copying nose/plugins/testid.py -> build/lib/nose/plugins
> copying nose/plugins/xunit.py -> build/lib/nose/plugins
> creating build/lib/nose/sphinx
> copying nose/sphinx/__init__.py -> build/lib/nose/sphinx
> copying nose/sphinx/pluginopts.py -> build/lib/nose/sphinx
> copying nose/usage.txt -> build/lib/nose
> Fixing build/lib/nose/__init__.py build/lib/nose/case.py build/lib/nose/commands.py build/lib/nose/config.py build/lib/nose/core.py build/lib/nose/exc.py build/lib/nose/failure.py build/lib/nose/importer.py build/lib/nose/inspector.py build/lib/nose/loader.py build/lib/nose/proxy.py build/lib/nose/pyversion.py build/lib/nose/result.py build/lib/nose/selector.py build/lib/nose/suite.py build/lib/nose/tools.py build/lib/nose/twistedtools.py build/lib/nose/util.py build/lib/nose/ext/__init__.py build/lib/nose/ext/dtcompat.py build/lib/nose/plugins/__init__.py build/lib/nose/plugins/allmodules.py build/lib/nose/plugins/attrib.py build/lib/nose/plugins/base.py build/lib/nose/plugins/builtin.py build/lib/nose/plugins/capture.py build/lib/nose/plugins/collect.py build/lib/nose/plugins/cover.py build/lib/nose/plugins/debug.py build/lib/nose/plugins/deprecated.py build/lib/nose/plugins/doctests.py build/lib/nose/plugins/errorclass.py build/lib/nose/plugins/failuredetail.py build/lib
/nose/plugins/isolate.py build/lib/nose/plugins/logcapture.py build/lib/nose/plugins/manager.py build/lib/nose/plugins/multiprocess.py build/lib/nose/plugins/plugintest.py build/lib/nose/plugins/prof.py build/lib/nose/plugins/skip.py build/lib/nose/plugins/testid.py build/lib/nose/plugins/xunit.py build/lib/nose/sphinx/__init__.py build/lib/nose/sphinx/pluginopts.py
> Skipping implicit fixer: buffer
> Skipping implicit fixer: idioms
> Skipping implicit fixer: set_literal
> Skipping implicit fixer: ws_comma
> Fixing build/lib/nose/__init__.py build/lib/nose/case.py build/lib/nose/commands.py build/lib/nose/config.py build/lib/nose/core.py build/lib/nose/exc.py build/lib/nose/failure.py build/lib/nose/importer.py build/lib/nose/inspector.py build/lib/nose/loader.py build/lib/nose/proxy.py build/lib/nose/pyversion.py build/lib/nose/result.py build/lib/nose/selector.py build/lib/nose/suite.py build/lib/nose/tools.py build/lib/nose/twistedtools.py build/lib/nose/util.py build/lib/nose/ext/__init__.py build/lib/nose/ext/dtcompat.py build/lib/nose/plugins/__init__.py build/lib/nose/plugins/allmodules.py build/lib/nose/plugins/attrib.py build/lib/nose/plugins/base.py build/lib/nose/plugins/builtin.py build/lib/nose/plugins/capture.py build/lib/nose/plugins/collect.py build/lib/nose/plugins/cover.py build/lib/nose/plugins/debug.py build/lib/nose/plugins/deprecated.py build/lib/nose/plugins/doctests.py build/lib/nose/plugins/errorclass.py build/lib/nose/plugins/failuredetail.py build/lib
/nose/plugins/isolate.py build/lib/nose/plugins/logcapture.py build/lib/nose/plugins/manager.py build/lib/nose/plugins/multiprocess.py build/lib/nose/plugins/plugintest.py build/lib/nose/plugins/prof.py build/lib/nose/plugins/skip.py build/lib/nose/plugins/testid.py build/lib/nose/plugins/xunit.py build/lib/nose/sphinx/__init__.py build/lib/nose/sphinx/pluginopts.py
> Skipping implicit fixer: buffer
> Skipping implicit fixer: idioms
> Skipping implicit fixer: set_literal
> Skipping implicit fixer: ws_comma


And the install results:
> running install
> install_dir /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/
> running bdist_egg
> running egg_info
> creating nose.egg-info
> writing nose.egg-info/PKG-INFO
> writing top-level names to nose.egg-info/top_level.txt
> writing dependency_links to nose.egg-info/dependency_links.txt
> writing entry points to nose.egg-info/entry_points.txt
> writing manifest file 'nose.egg-info/SOURCES.txt'
> reading manifest file 'nose.egg-info/SOURCES.txt'
> writing manifest file 'nose.egg-info/SOURCES.txt'
> installing library code to build/bdist.macosx-10.3-fat/egg
> running install_lib
> running build_py
> creating build/bdist.macosx-10.3-fat
> creating build/bdist.macosx-10.3-fat/egg
> creating build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/__init__.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/case.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/commands.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/config.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/core.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/exc.py -> build/bdist.macosx-10.3-fat/egg/nose
> creating build/bdist.macosx-10.3-fat/egg/nose/ext
> copying build/lib/nose/ext/__init__.py -> build/bdist.macosx-10.3-fat/egg/nose/ext
> copying build/lib/nose/ext/dtcompat.py -> build/bdist.macosx-10.3-fat/egg/nose/ext
> copying build/lib/nose/failure.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/importer.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/inspector.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/loader.py -> build/bdist.macosx-10.3-fat/egg/nose
> creating build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/__init__.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/allmodules.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/attrib.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/base.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/builtin.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/capture.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/collect.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/cover.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/debug.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/deprecated.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/doctests.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/errorclass.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/failuredetail.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/isolate.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/logcapture.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/manager.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/multiprocess.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/plugintest.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/prof.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/skip.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/testid.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/plugins/xunit.py -> build/bdist.macosx-10.3-fat/egg/nose/plugins
> copying build/lib/nose/proxy.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/pyversion.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/result.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/selector.py -> build/bdist.macosx-10.3-fat/egg/nose
> creating build/bdist.macosx-10.3-fat/egg/nose/sphinx
> copying build/lib/nose/sphinx/__init__.py -> build/bdist.macosx-10.3-fat/egg/nose/sphinx
> copying build/lib/nose/sphinx/pluginopts.py -> build/bdist.macosx-10.3-fat/egg/nose/sphinx
> copying build/lib/nose/suite.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/tools.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/twistedtools.py -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/usage.txt -> build/bdist.macosx-10.3-fat/egg/nose
> copying build/lib/nose/util.py -> build/bdist.macosx-10.3-fat/egg/nose
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/__init__.py to __init__.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/case.py to case.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/commands.py to commands.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/config.py to config.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/core.py to core.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/exc.py to exc.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/ext/__init__.py to __init__.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/ext/dtcompat.py to dtcompat.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/failure.py to failure.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/importer.py to importer.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/inspector.py to inspector.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/loader.py to loader.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/__init__.py to __init__.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/allmodules.py to allmodules.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/attrib.py to attrib.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/base.py to base.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/builtin.py to builtin.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/capture.py to capture.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/collect.py to collect.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/cover.py to cover.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/debug.py to debug.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/deprecated.py to deprecated.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/doctests.py to doctests.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/errorclass.py to errorclass.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/failuredetail.py to failuredetail.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/isolate.py to isolate.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/logcapture.py to logcapture.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/manager.py to manager.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/multiprocess.py to multiprocess.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/plugintest.py to plugintest.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/prof.py to prof.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/skip.py to skip.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/testid.py to testid.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/plugins/xunit.py to xunit.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/proxy.py to proxy.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/pyversion.py to pyversion.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/result.py to result.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/selector.py to selector.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/sphinx/__init__.py to __init__.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/sphinx/pluginopts.py to pluginopts.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/suite.py to suite.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/tools.py to tools.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/twistedtools.py to twistedtools.pyc
> byte-compiling build/bdist.macosx-10.3-fat/egg/nose/util.py to util.pyc
> installing package data to build/bdist.macosx-10.3-fat/egg
> running install_data
> creating build/bdist.macosx-10.3-fat/egg/man
> creating build/bdist.macosx-10.3-fat/egg/man/man1
> copying nosetests.1 -> build/bdist.macosx-10.3-fat/egg/man/man1
> creating build/bdist.macosx-10.3-fat/egg/EGG-INFO
> copying nose.egg-info/PKG-INFO -> build/bdist.macosx-10.3-fat/egg/EGG-INFO
> copying nose.egg-info/SOURCES.txt -> build/bdist.macosx-10.3-fat/egg/EGG-INFO
> copying nose.egg-info/dependency_links.txt -> build/bdist.macosx-10.3-fat/egg/EGG-INFO
> copying nose.egg-info/entry_points.txt -> build/bdist.macosx-10.3-fat/egg/EGG-INFO
> copying nose.egg-info/not-zip-safe -> build/bdist.macosx-10.3-fat/egg/EGG-INFO
> copying nose.egg-info/top_level.txt -> build/bdist.macosx-10.3-fat/egg/EGG-INFO
> creating dist
> creating 'dist/nose-1.1.2-py3.2.egg' and adding 'build/bdist.macosx-10.3-fat/egg' to it
> removing 'build/bdist.macosx-10.3-fat/egg' (and everything under it)
> Processing nose-1.1.2-py3.2.egg
> creating /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/nose-1.1.2-py3.2.egg
> Extracting nose-1.1.2-py3.2.egg to /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages
> Adding nose 1.1.2 to easy-install.pth file


> Traceback (most recent call last):

> File "setup.py", line 119, in <module>
> **addl_args
> File "/Users/RPS/Downloads/nose-1.1.2/setup3lib.py", line 140, in setup
> return _setup(*args, **kwargs)
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/core.py", line 150, in setup
> dist.run_commands()
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 919, in run_commands
> self.run_command(cmd)
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 938, in run_command
> cmd_obj.run()
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/install.py", line 73, in run
> self.do_egg_install()
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/install.py", line 101, in do_egg_install
> cmd.run()
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/easy_install.py", line 342, in run
> self.easy_install(spec, not self.no_deps)
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/easy_install.py", line 562, in easy_install
> return self.install_item(None, spec, tmpdir, deps, True)
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/easy_install.py", line 614, in install_item
> self.process_distribution(spec, dist, deps)
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/easy_install.py", line 643, in process_distribution
> self.install_egg_scripts(dist)
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/easy_install.py", line 513, in install_egg_scripts
> self.install_wrapper_scripts(dist)
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/easy_install.py", line 717, in install_wrapper_scripts
> for args in get_script_args(dist):
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/easy_install.py", line 1738, in get_script_args
> header = get_script_header("", executable, wininst)
> File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/distribute-0.6.14-py3.2.egg/setuptools/command/easy_install.py", line 1590, in get_script_header
> match = first_line_re.match(first)
> TypeError: can't use a bytes pattern on a string-like object


Looking closely at that, it looks like the install might not have
completely properly, something I hadn't noticed before. At the same
time, I haven't a clue how to fix that.
--

R. Padraic Springuel, PhD

Kumar McMillan

unread,
Aug 4, 2011, 12:07:08 PM8/4/11
to nose-...@googlegroups.com
On Thu, Aug 4, 2011 at 10:33 AM, R. Padraic Springuel
<R.Spr...@umit.maine.edu> wrote:
> Typing pip --version on the command line yields the following results:
> pip 1.0.2 from
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg
> (python 2.7)
>
> This might explain the problem, as that's clearly no associated with python
> 2.7, no 3.2.  Furthermore, looking into my two site-pakages folders
> confirmed that a version of pip existed in python 2.7's folder, but not
> 3.2's.  I've fixed that by redownloading pip and building and installing it
> with python 3.2, but this doesn't change the results of pip --version, nor
> the results of pip install nose (it still only looks at the 2.7 folder, not
> the 3.2 folder).
>

You have to use the pip that was installed into 3.2. For example:
/path/to/python/3.2/bin/pip. I'd also recommend doing this inside of
a virtualenv.

> I've tried building and installing nose from source the "old-fashioned" way
> with nose 1.1.2 and that results in the import error I quoted in my previous
> message (indeed, I may have tried that before composing that email, which
> might explain why I got a message from pip that said it didn't need to
> install anything but there was still a version of nose in the site-packages
> folder).

You need to have distribute installed in 3.2 first. You also need to
remove Nose from your 3.2 packages at this point since a mis-compiled
one is in there now from your previous attempt (I think)

R. Padraic Springuel

unread,
Aug 5, 2011, 11:16:48 AM8/5/11
to nose-...@googlegroups.com
Well, in trying to make sure that I was using the version of pip
associated with 3.2 I noted that there was no pip script in
python/3.2/bin/ so I decided to start the whole installation process
over again (including both distribute and pip) in order to try and
correct that. Having done that, everything works fine now, no virtual
environment needed.

For those interested in replicating my results, here's the list of
commands that I used:

$ curl -O http://python-distribute.org/distribute_setup.py
$ python3.2 distribute_setup.py
$ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
$ python3.2 get-pip.py
$ /path/to/python/3.2/bin/pip install nose

Reply all
Reply to author
Forward
0 new messages