no module named warnings

1,214 views
Skip to first unread message

StephenPSchaefer

unread,
Nov 15, 2010, 7:02:41 PM11/15/10
to Mozilla Skywriter
I'm trying to follow the instructions to build Skywriter 0.9a2; I hope
my difficulty is clear from the following::

bash-4.1$ pwd
/home/sps/Git/Weave/bespinclient
bash-4.1$ cat /etc/redhat-release
Fedora release 14 (Laughlin)
bash-4.1$ rpm -q python
python-2.7-8.fc14.1.x86_64
bash-4.1$ python bootstrap.py --no-site-packages
New python executable in ./bin/python
Traceback (most recent call last):
File "/home/sps/Git/Weave/bespinclient/lib64/python2.7/site.py",
line 67, in <module>
import os
File "/home/sps/Git/Weave/bespinclient/lib64/python2.7/os.py", line
49, in <module>
import posixpath as path
File "/home/sps/Git/Weave/bespinclient/lib64/python2.7/
posixpath.py", line 16, in <module>
import warnings
ImportError: No module named warnings
Installing setuptools...........
Complete output from command ./bin/python -c "#!python
\"\"\"Bootstrap setuptoo...




" --always-copy -U setuptools:
Traceback (most recent call last):
File "/home/sps/Git/Weave/bespinclient/lib64/python2.7/site.py",
line 67, in <module>
import os
File "/home/sps/Git/Weave/bespinclient/lib64/python2.7/os.py", line
49, in <module>
import posixpath as path
File "/home/sps/Git/Weave/bespinclient/lib64/python2.7/
posixpath.py", line 16, in <module>
import warnings
ImportError: No module named warnings
----------------------------------------
...Installing setuptools...done.
Traceback (most recent call last):
File "bootstrap.py", line 1292, in <module>
main()
File "bootstrap.py", line 425, in main
unzip_setuptools=options.unzip_setuptools)
File "bootstrap.py", line 512, in create_environment
install_setuptools(py_executable, unzip=unzip_setuptools)
File "bootstrap.py", line 297, in install_setuptools
cwd=cwd)
File "bootstrap.py", line 486, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command ./bin/python -c "#!python
\"\"\"Bootstrap setuptoo...




" --always-copy -U setuptools failed with error code 1

Kevin Dangoor

unread,
Nov 16, 2010, 11:42:50 AM11/16/10
to skyw...@googlegroups.com
I should note that you can make custom Bespin builds just by downloading the 0.9a2 release, which does not require running the bootstrap script and such.

Beyond that, I'm not sure what's going on. The warnings module is part of Python and has been for a long time and you're running the latest Python 2.x release.

Kevin


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




--
Kevin Dangoor

work: http://mozilla.com/
email: k...@blazingthings.com
blog: http://www.BlueSkyOnMars.com

StephenPSchaefer

unread,
Nov 16, 2010, 1:42:45 PM11/16/10
to Mozilla Skywriter
strace shows that bootstrap.py creates, among other things, a bin and
lib directory, and as symlink to lib. The bin/python that gets
executed does not look for modules outside of that lib directory, and
althogh some modules have been copied into there, warnings.py is not
among them. How does bootstrap.py decide which modules to copy?

- Stephen
> > skywriter+...@googlegroups.com<skywriter%2Bunsu...@googlegroups.com>
> > .

StephenPSchaefer

unread,
Nov 16, 2010, 1:52:49 PM11/16/10
to Mozilla Skywriter
OK; I've gotten past that error with this:

bash-4.1$ hg diff
diff -r 7a26fc678ad9 bootstrap.py
--- a/bootstrap.py Mon Oct 11 10:40:16 2010 -0700
+++ b/bootstrap.py Tue Nov 16 13:48:43 2010 -0500
@@ -36,7 +36,7 @@
're', 'sre', 'sre_parse', 'sre_constants',
'sre_compile',
'lib-dynload', 'config', 'zlib']

-if sys.version_info[:2] == (2, 6):
+if sys.version_info[:2] == (2, 6) or sys.version_info[:2] == (2, 7):
REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll',
'abc'])
if sys.version_info[:2] <= (2, 3):
REQUIRED_MODULES.extend(['sets', '__future__'])

*NOW* the next problem is this:

Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c9-py2.7.egg
Traceback (most recent call last):
File "<string>", line 270, in <module>
File "<string>", line 202, in main
File "<string>", line 150, in download_setuptools
File "/usr/lib64/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib64/python2.7/urllib2.py", line 397, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 435, in error
return self._call_chain(*args)
File "/usr/lib64/python2.7/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 518, in
http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found

Does someone have a **clean** way to put python 2.6 on Fedora 14?

On Nov 16, 1:42 pm, StephenPSchaefer <s.schaefer.at....@gmail.com>
wrote:

StephenPSchaefer

unread,
Nov 16, 2010, 2:04:48 PM11/16/10
to Mozilla Skywriter
P.S. python-setuptools-0.6.14 is installed, but installs -- you
guessed it -- in /usr/lib/python2.7/site-packages

I see bootstrap.py explicitly asking for 0.6.9; is 0.6.11 acceptable?
If so, I can probably specify that conditionally, since that'w what's
available at http://pypi.python.org/packages/2.7/s/setuptools/

- Stephen

On Nov 16, 1:52 pm, StephenPSchaefer <s.schaefer.at....@gmail.com>
wrote:
> OK; I've gotten past that error with this:
>
> bash-4.1$ hg diff
> diff -r 7a26fc678ad9 bootstrap.py
> --- a/bootstrap.py      Mon Oct 11 10:40:16 2010 -0700
> +++ b/bootstrap.py      Tue Nov 16 13:48:43 2010 -0500
> @@ -36,7 +36,7 @@
>                      're', 'sre', 'sre_parse', 'sre_constants',
> 'sre_compile',
>                      'lib-dynload', 'config', 'zlib']
>
> -if sys.version_info[:2] == (2, 6):
> +if sys.version_info[:2] == (2, 6) or sys.version_info[:2] == (2, 7):
>      REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll',
> 'abc'])
>  if sys.version_info[:2] <= (2, 3):
>      REQUIRED_MODULES.extend(['sets', '__future__'])
>
> *NOW* the next problem is this:
>
>   Downloadinghttp://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c9-py2...

Kevin Dangoor

unread,
Nov 16, 2010, 2:44:32 PM11/16/10
to skyw...@googlegroups.com
bootstrap.py is generated by virtualenv. perhaps a new version of virtualenv (and a new bootstrap.py) is needed?

The Python code is deprecated, by the way, so we're generally angling away from the setup that's giving you troubles right now.

To unsubscribe from this group, send email to skywriter+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/skywriter?hl=en.

StephenPSchaefer

unread,
Nov 16, 2010, 3:10:09 PM11/16/10
to Mozilla Skywriter
I hardcoded a change from 0.6c9 to 0.6c11 in bootstrap.py, and it
still tries to pull in 0.6c9. "grep -Rl 0.6c9 ." claims no file
contains the string. I'm guessing it's somewhere in those base64
encoded zlib compressed blobs within bootstrap.py. Who (or, more
likely, what) created bootstrap.py?

- Stephen

bash-4.1$ python bootstrap.py --no-site-packages
New python executable in ./bin/python
Installing setuptools.....................
Complete output from command ./bin/python -c "#!python
\"\"\"Bootstrap setuptoo...




" --always-copy -U setuptools:
Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c9-py2.7.egg

[[tracebacks elided]]

bash-4.1$ hg diff
diff -r 7a26fc678ad9 bootstrap.py
--- a/bootstrap.py Mon Oct 11 10:40:16 2010 -0700
+++ b/bootstrap.py Tue Nov 16 14:45:08 2010 -0500
@@ -36,7 +36,7 @@
're', 'sre', 'sre_parse', 'sre_constants',
'sre_compile',
'lib-dynload', 'config', 'zlib']

-if sys.version_info[:2] == (2, 6):
+if sys.version_info[:2] == (2, 6) or sys.version_info[:2] == (2, 7):
REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll',
'abc'])
if sys.version_info[:2] <= (2, 3):
REQUIRED_MODULES.extend(['sets', '__future__'])
@@ -246,7 +246,7 @@
logger.info('Changed mode of %s to %s', fn, oct(newmode))

def install_setuptools(py_executable, unzip=False):
- setup_fn = 'setuptools-0.6c9-py%s.egg' % sys.version[:3]
+ setup_fn = 'setuptools-0.6c11-py%s.egg' % sys.version[:3]
search_dirs = ['.', os.path.dirname(__file__),
join(os.path.dirname(__file__), 'support-files')]
if os.path.splitext(os.path.dirname(__file__))[0] !=
'virtualenv':
# Probably some boot script; just in case virtualenv is
installed...

On Nov 16, 2:04 pm, StephenPSchaefer <s.schaefer.at....@gmail.com>
wrote:
> P.S. python-setuptools-0.6.14 is installed, but installs -- you
> guessed it -- in /usr/lib/python2.7/site-packages
>
> I see bootstrap.py explicitly asking for 0.6.9; is 0.6.11 acceptable?
> If so, I can probably specify that conditionally, since that'w what's
> available athttp://pypi.python.org/packages/2.7/s/setuptools/

StephenPSchaefer

unread,
Nov 16, 2010, 3:24:11 PM11/16/10
to Mozilla Skywriter
Thanks. Our messages crossed.

So if the python code is deprecated, may I see the beginning of its
replacement? I'm doing exploratory work for a project that might take
more than a year, so I'm not interested in stuff that won't be usable
(and already may not be...)

- Stephen

On Nov 16, 2:44 pm, Kevin Dangoor <kdang...@mozilla.com> wrote:
> bootstrap.py is generated by virtualenv. perhaps a new version of virtualenv
> (and a new bootstrap.py) is needed?
>
> The Python code is deprecated, by the way, so we're generally angling away
> from the setup that's giving you troubles right now.
>
> On Tue, Nov 16, 2010 at 2:04 PM, StephenPSchaefer <
>
>
>
> s.schaefer.at....@gmail.com> wrote:
> > P.S. python-setuptools-0.6.14 is installed, but installs -- you
> > guessed it -- in /usr/lib/python2.7/site-packages
>
> > I see bootstrap.py explicitly asking for 0.6.9; is 0.6.11 acceptable?
> > If so, I can probably specify that conditionally, since that'w what's
> > available athttp://pypi.python.org/packages/2.7/s/setuptools/
> > <skywriter%2Bunsu...@googlegroups.com<skywriter%252Buns...@googlegroups.com>

Kevin Dangoor

unread,
Nov 16, 2010, 3:58:17 PM11/16/10
to skyw...@googlegroups.com
Aha. So, the basic story that is unfolding now is that the Skywriter project is focused on creating the best possible customizable, embeddable text component. We're streamlining things a good deal for Skywriter 1.0. Build tooling will be based on node.js.

So, if you're just looking for the embedded editor, that work is underway, but not ready yet (possibly ready for interested people to jump in and help soon, though!)

If you're looking for a full open source client/server that will use the same editor base as Skywriter 1.0, then you can look at http://cloud9ide.com/    (note that that code is GPL whereas Skywriter is tri-licensed).

Kevin

To unsubscribe from this group, send email to skywriter+...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/skywriter?hl=en.

StephenPSchaefer

unread,
Nov 16, 2010, 4:10:34 PM11/16/10
to Mozilla Skywriter
Thanks! I saw the Jakefile in the git repository, so node.js is
building as I type (odd that there isn't a Fedora 14 package; did I
yum search badly?). Thanks also for the pointer to cloud9ide.com; I'm
at what I call the "magpie" stage of this project, and I'm sure that,
if nothing else, cloud9ide will help me understand what, if anything,
I want to do differently.

- Stephen

On Nov 16, 3:58 pm, Kevin Dangoor <kdang...@mozilla.com> wrote:
> Aha. So, the basic story that is unfolding now is that the Skywriter project
> is focused on creating the best possible customizable, embeddable text
> component. We're streamlining things a good deal for Skywriter 1.0. Build
> tooling will be based on node.js.
>
> So, if you're just looking for the embedded editor, that work is underway,
> but not ready yet (possibly ready for interested people to jump in and help
> soon, though!)
>
> If you're looking for a full open source client/server that will use the
> same editor base as Skywriter 1.0, then you can look athttp://cloud9ide.com/   (note that that code is GPL whereas Skywriter is
> > > > <skywriter%2Bunsu...@googlegroups.com<skywriter%252Buns...@googlegroups.com>
> > <skywriter%252Buns...@googlegroups.com<skywriter%25252Bun...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages