Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing in a python 3.3b2 or python 3.3rc1 virtual environment. #2343

Closed
andrewspiers opened this issue Aug 26, 2012 · 2 comments
Closed
Milestone

Comments

@andrewspiers
Copy link
Contributor

Hi, I'm having trouble installing inside a venv.

I activate the venv, install distribute, install ipython:
python setup.py install
and then when trying to run the ipython3 binary which is installed, I get
'TypeError: init() got an unexpected keyword argument 'version'
Have I perhaps missed some necessary dependency?

Traceback is given below. I've tried the git version of ipython, and
ipython 0.13.

(ipythontest) andrew@wiki:~/ipythontest/bin$ ./ipython3
Traceback (most recent call last):
File "./ipython3", line 9, in
load_entry_point('ipython==0.14.dev', 'console_scripts', 'ipython3')()
File "/home/andrew/ipythontest/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/pkg_resources.py",
line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/andrew/ipythontest/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/pkg_resources.py",
line 2312, in load_entry_point
return ep.load()
File "/home/andrew/ipythontest/lib/python3.3/site-packages/distribute-0.6.28-py3.3.egg/pkg_resources.py",
line 2018, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/home/andrew/ipythontest/lib/python3.3/site-packages/ipython-0.14.dev-py3.3.egg/IPython/init.py",
line 46, in
from .frontend.terminal.embed import embed
File "/home/andrew/ipythontest/lib/python3.3/site-packages/ipython-0.14.dev-py3.3.egg/IPython/frontend/terminal/embed.py",
line 40, in
from IPython.frontend.terminal.ipapp import load_default_config
File "/home/andrew/ipythontest/lib/python3.3/site-packages/ipython-0.14.dev-py3.3.egg/IPython/frontend/terminal/ipapp.py",
line 46, in
from IPython.core.magics import ScriptMagics
File "/home/andrew/ipythontest/lib/python3.3/site-packages/ipython-0.14.dev-py3.3.egg/IPython/core/magics/init.py",
line 17, in
from .basic import BasicMagics
File "/home/andrew/ipythontest/lib/python3.3/site-packages/ipython-0.14.dev-py3.3.egg/IPython/core/magics/basic.py",
line 37, in
class BasicMagics(Magics):
File "/home/andrew/ipythontest/lib/python3.3/site-packages/ipython-0.14.dev-py3.3.egg/IPython/core/magics/basic.py",
line 61, in BasicMagics
def alias_magic(self, line=''):
File "/home/andrew/ipythontest/lib/python3.3/site-packages/ipython-0.14.dev-py3.3.egg/IPython/core/magic_arguments.py",
line 173, in call
func.parser = construct_parser(func)
File "/home/andrew/ipythontest/lib/python3.3/site-packages/ipython-0.14.dev-py3.3.egg/IPython/core/magic_arguments.py",
line 103, in construct_parser
parser = MagicArgumentParser(arg_name, **kwds)
File "/home/andrew/ipythontest/lib/python3.3/site-packages/ipython-0.14.dev-py3.3.egg/IPython/core/magic_arguments.py",
line 82, in init
conflict_handler=conflict_handler, add_help=add_help)
TypeError: init() got an unexpected keyword argument 'version'

Matthias Bussonnier suggests:
"version" keyword seem to be deprecated even in 2.7, it might have been dropped in the version of python you use, so it a bug on our side.

http://hg.python.org/cpython/file/2.7/Lib/argparse.py
1557 if version is not None:
1558 import warnings
1559 warnings.warn(
1560 """The "version" argument to ArgumentParser is deprecated. """
1561 """Please use """
1562 """"add_argument(..., action='version', version="N", ...)" """
1563 """instead""", DeprecationWarning)

Background:
I'm running Debian squeeze, I installed the dependencies listed in the
debian .dsc file for python 3 before doing a source install. That is,
the following packages:
quilt autoconf libreadline6-dev libncursesw5-dev zlib1g-dev
libdb4.8-dev tk8.5-dev blt-dev libssl-dev sharutils libbz2-dev
libbluetooth-dev locales libsqlite3-dev libffi-dev mime-support
libgpm2 netbase lsb-release bzip2 gdb

@andrewspiers
Copy link
Contributor Author

This seems to fix it:

diff --git a/IPython/core/magic_arguments.py b/IPython/core/magic_arguments.py
index ca83da9..ce43bd6 100644
--- a/IPython/core/magic_arguments.py
+++ b/IPython/core/magic_arguments.py
@@ -66,7 +66,6 @@ def __init__(self,
                  usage=None,
                  description=None,
                  epilog=None,
-                 version=None,
                  parents=None,
                  formatter_class=MagicHelpFormatter,
                  prefix_chars='-',
@@ -76,7 +75,7 @@ def __init__(self,
         if parents is None:
             parents = []
         super(MagicArgumentParser, self).__init__(prog=prog, usage=usage,
-            description=description, epilog=epilog, version=version,
+            description=description, epilog=epilog, 
             parents=parents, formatter_class=formatter_class,
             prefix_chars=prefix_chars, argument_default=argument_default,
             conflict_handler=conflict_handler, add_help=add_help)

Carreau added a commit to Carreau/ipython that referenced this issue Aug 26, 2012
andrewspiers added a commit to andrewspiers/ipython that referenced this issue Aug 26, 2012
Remove references to 'version' no longer in argparse. Github issue ipython#2343.
Carreau added a commit that referenced this issue Aug 29, 2012
Remove references to 'version' no longer in argparse. Github issue #2343.
@bfroehle
Copy link
Contributor

I believe this was fixed in #2345.

minrk added a commit that referenced this issue Aug 29, 2012
…se. Github issue #2343.

Remove references to 'version' no longer in argparse. Github issue #2343.
minrk added a commit that referenced this issue Sep 1, 2012
…se. Github issue #2343.

Remove references to 'version' no longer in argparse. Github issue #2343.
Carreau pushed a commit to Carreau/ipython that referenced this issue Sep 5, 2012
Remove references to 'version' no longer in argparse. Github issue ipython#2343.
yarikoptic added a commit to yarikoptic/ipython that referenced this issue May 2, 2014
* tag 'rel-0.13.1': (27 commits)
  remove rc for 0.13.1 final
  0.13.1.rc3
  qtconsole extras_require to whatsnew
  Backport PR ipython#2492: add missing 'qtconsole' extras_require
  add 2480 to whatsnew
  Backport PR ipython#2480: Add deprecation warnings for sympyprinting
  PR 2384 to whatsnew
  mark 0.13.1.rc2
  Backport PR ipython#2384: Adapt inline backend to changes in matplotlib
  mark 0.13.1.rc1
  update 0.13.1 whatsnew lists
  Backport PR ipython#2479: use new _winapi instead of removed _subprocess
  Backport PR ipython#2437: don't let log cleanup prevent engine start
  Backport PR ipython#2405: clarify TaskScheduler.hwm doc
  Backport PR ipython#2377: Fix installation of man pages in Python 3
  start 0.13.1 whatsnew
  Backport PR ipython#2373: fix missing imports in core.interactiveshell
  Backport PR ipython#2365: fix names of notebooks for download/save
  Backport PR ipython#2345: Remove references to 'version' no longer in argparse. Github issue ipython#2343.
  Backport PR ipython#2347: adjust division error message checking to account for Python 3
  ...
yarikoptic added a commit to yarikoptic/ipython that referenced this issue May 2, 2014
* tag 'rel-0.13.1': (51 commits)
  remove rc for 0.13.1 final
  0.13.1.rc3
  qtconsole extras_require to whatsnew
  Backport PR ipython#2492: add missing 'qtconsole' extras_require
  add 2480 to whatsnew
  Backport PR ipython#2480: Add deprecation warnings for sympyprinting
  PR 2384 to whatsnew
  mark 0.13.1.rc2
  Backport PR ipython#2384: Adapt inline backend to changes in matplotlib
  mark 0.13.1.rc1
  update 0.13.1 whatsnew lists
  Backport PR ipython#2479: use new _winapi instead of removed _subprocess
  Backport PR ipython#2437: don't let log cleanup prevent engine start
  Backport PR ipython#2405: clarify TaskScheduler.hwm doc
  Backport PR ipython#2377: Fix installation of man pages in Python 3
  start 0.13.1 whatsnew
  Backport PR ipython#2373: fix missing imports in core.interactiveshell
  Backport PR ipython#2365: fix names of notebooks for download/save
  Backport PR ipython#2345: Remove references to 'version' no longer in argparse. Github issue ipython#2343.
  Backport PR ipython#2347: adjust division error message checking to account for Python 3
  ...
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Remove references to 'version' no longer in argparse. Github issue ipython#2343.
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Remove references to 'version' no longer in argparse. Github issue ipython#2343.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants