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

Cannot open bpyton #494

Closed
Maka7veli opened this Issue Feb 28, 2015 · 19 comments

Comments

Projects
None yet
5 participants
@Maka7veli

Maka7veli commented Feb 28, 2015

I have installed fresh OX on my Mac, installed bpython and I have been getting errors when I try to start bpython since. This is the error message I am getting:

Tomics-MBP:~ Tom$ bpython
Traceback (most recent call last):
File "/usr/local/bin/bpython", line 9, in
load_entry_point('bpython==0.15.dev54', 'console_scripts', 'bpython')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/Library/Python/2.7/site-packages/bpython-0.15.dev54-py2.7.egg/bpython/curtsies.py", line 14, in
from bpython.curtsiesfrontend.repl import Repl
File "/Library/Python/2.7/site-packages/bpython-0.15.dev54-py2.7.egg/bpython/curtsiesfrontend/repl.py", line 33, in
from bpython.config import (Struct, loadini, default_config_path,
File "/Library/Python/2.7/site-packages/bpython-0.15.dev54-py2.7.egg/bpython/config.py", line 8, in
from six.moves.configparser import ConfigParser
ImportError: No module named configparser

@sebastinas

This comment has been minimized.

Contributor

sebastinas commented Feb 28, 2015

What's your six version?

@Maka7veli

This comment has been minimized.

Maka7veli commented Feb 28, 2015

Python 2.7.6, and I am running OSX Yosemite 10.10.2. I did not mess around with files or anything.

@sebastinas

This comment has been minimized.

Contributor

sebastinas commented Feb 28, 2015

How did you install bpython? Did you install all the required dependencies?

@Maka7veli

This comment has been minimized.

Maka7veli commented Feb 28, 2015

git clone https://github.com/bpython/bpython/
and
easy_install bpython

@Maka7veli

This comment has been minimized.

Maka7veli commented Feb 28, 2015

that's all I did. Is there anything else I need to install?

@sebastinas

This comment has been minimized.

Contributor

sebastinas commented Feb 28, 2015

Since you're trying to use the git version, please follow the steps outlined in http://docs.bpython-interpreter.org/contributing.html#getting-your-development-environment-set-up. The most important part being:

# install bpython and required dependencies
$ pip install -e .
@Maka7veli

This comment has been minimized.

Maka7veli commented Feb 28, 2015

Thank you so much sebastians, let me try that and I'll get back to you in a few. Thanks

@Maka7veli

This comment has been minimized.

Maka7veli commented Feb 28, 2015

I am getting same error again..... So i deleted all previous bpython files and downloaded again with git and I followed these steps:

$ cd bpython

install bpython and required dependencies

$ pip install -e .

install optional dependencies

$ pip install watchdog urwid

development dependencies

$ pip install sphinx mock nose

this runs your modified copy of bpython!

$ bpython

Everything installed successfully and when I start bpython same error :(

Please help

@sebastinas

This comment has been minimized.

Contributor

sebastinas commented Feb 28, 2015

Please post the log of the install and the output of pip freeze

@Maka7veli

This comment has been minimized.

Maka7veli commented Feb 28, 2015

Tomics-MBP:bpython root# pip install -e .
Obtaining file:///private/var/root/bpython
Requirement already satisfied (use --upgrade to upgrade): pygments in /Library/Python/2.7/site-packages/Pygments-2.0.2-py2.7.egg (from bpython==0.15.dev54)
Requirement already satisfied (use --upgrade to upgrade): requests in /Library/Python/2.7/site-packages/requests-2.5.3-py2.7.egg (from bpython==0.15.dev54)
Requirement already satisfied (use --upgrade to upgrade): curtsies>=0.1.18 in /Library/Python/2.7/site-packages/curtsies-0.2.3-py2.7.egg (from bpython==0.15.dev54)
Requirement already satisfied (use --upgrade to upgrade): greenlet in /Library/Python/2.7/site-packages/greenlet-0.4.5-py2.7-macosx-10.10-intel.egg (from bpython==0.15.dev54)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from bpython==0.15.dev54)
Requirement already satisfied (use --upgrade to upgrade): PyOpenSSL in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from bpython==0.15.dev54)
Requirement already satisfied (use --upgrade to upgrade): ndg-httpsclient in /Library/Python/2.7/site-packages/ndg_httpsclient-0.3.3-py2.7.egg (from bpython==0.15.dev54)
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /Library/Python/2.7/site-packages/pyasn1-0.1.7-py2.7.egg (from bpython==0.15.dev54)
Requirement already satisfied (use --upgrade to upgrade): blessings>=1.5 in /Library/Python/2.7/site-packages/blessings-1.6-py2.7.egg (from curtsies>=0.1.18->bpython==0.15.dev54)
Requirement already satisfied (use --upgrade to upgrade): wcwidth>=0.1.4 in /Library/Python/2.7/site-packages/wcwidth-0.1.4-py2.7.egg (from curtsies>=0.1.18->bpython==0.15.dev54)
Installing collected packages: bpython
Running setup.py develop for bpython
Checking .pth file support in /Library/Python/2.7/site-packages/
/usr/bin/python -E -c pass
TEST PASSED: /Library/Python/2.7/site-packages/ appears to support .pth files
Creating /Library/Python/2.7/site-packages/bpython.egg-link (link to .)
bpython 0.15.dev54 is already the active version in easy-install.pth
Installing bpbd script to /usr/local/bin
Installing bpython-urwid script to /usr/local/bin
Installing bpython-curses script to /usr/local/bin
Installing bpython script to /usr/local/bin
Installed /private/var/root/bpython
Successfully installed bpython-0.15.dev54

Tomics-MBP:bpython root# pip install watchdog urwid
Requirement already satisfied (use --upgrade to upgrade): watchdog in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): urwid in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.10 in /Library/Python/2.7/site-packages (from watchdog)
Requirement already satisfied (use --upgrade to upgrade): argh>=0.24.1 in /Library/Python/2.7/site-packages (from watchdog)
Requirement already satisfied (use --upgrade to upgrade): pathtools>=0.1.1 in /Library/Python/2.7/site-packages (from watchdog)
Tomics-MBP:bpython root#

Tomics-MBP:bpython root# pip install sphinx mock nose
Requirement already satisfied (use --upgrade to upgrade): sphinx in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): mock in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): nose in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): Pygments>=1.2 in /Library/Python/2.7/site-packages/Pygments-2.0.2-py2.7.egg (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.7 in /Library/Python/2.7/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.3 in /Library/Python/2.7/site-packages (from sphinx)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /Library/Python/2.7/site-packages (from Jinja2>=2.3->sphinx)
Tomics-MBP:bpython root#

@Maka7veli

This comment has been minimized.

Maka7veli commented Feb 28, 2015

Tomics-MBP:bpython root# pip freeze
altgraph==0.10.2
argh==0.26.1
bdist-mpkg==0.5.0
blessings==1.6
bonjour-py==0.3
-e git+https://github.com/bpython/bpython/@5f836ead89506c4a67b1c3c2fc7f4b98d823041c#egg=bpython-master
curtsies==0.2.3
docutils==0.12
gnureadline==6.3.3
greenlet==0.4.5
ipython==3.0.0
Jinja2==2.7.3
macholib==1.5.1
MarkupSafe==0.23
matplotlib==1.3.1
mock==1.0.1
modulegraph==0.10.4
ndg-httpsclient==0.3.3
nose==1.3.4
numpy==1.8.0rc1
pathtools==0.1.2
py2app==0.7.3
pyasn1==0.1.7
Pygments==2.0.2
pyobjc-core==2.5.1
pyobjc-framework-Accounts==2.5.1
pyobjc-framework-AddressBook==2.5.1
pyobjc-framework-AppleScriptKit==2.5.1
pyobjc-framework-AppleScriptObjC==2.5.1
pyobjc-framework-Automator==2.5.1
pyobjc-framework-CFNetwork==2.5.1
pyobjc-framework-Cocoa==2.5.1
pyobjc-framework-Collaboration==2.5.1
pyobjc-framework-CoreData==2.5.1
pyobjc-framework-CoreLocation==2.5.1
pyobjc-framework-CoreText==2.5.1
pyobjc-framework-DictionaryServices==2.5.1
pyobjc-framework-EventKit==2.5.1
pyobjc-framework-ExceptionHandling==2.5.1
pyobjc-framework-FSEvents==2.5.1
pyobjc-framework-InputMethodKit==2.5.1
pyobjc-framework-InstallerPlugins==2.5.1
pyobjc-framework-InstantMessage==2.5.1
pyobjc-framework-LatentSemanticMapping==2.5.1
pyobjc-framework-LaunchServices==2.5.1
pyobjc-framework-Message==2.5.1
pyobjc-framework-OpenDirectory==2.5.1
pyobjc-framework-PreferencePanes==2.5.1
pyobjc-framework-PubSub==2.5.1
pyobjc-framework-QTKit==2.5.1
pyobjc-framework-Quartz==2.5.1
pyobjc-framework-ScreenSaver==2.5.1
pyobjc-framework-ScriptingBridge==2.5.1
pyobjc-framework-SearchKit==2.5.1
pyobjc-framework-ServiceManagement==2.5.1
pyobjc-framework-Social==2.5.1
pyobjc-framework-SyncServices==2.5.1
pyobjc-framework-SystemConfiguration==2.5.1
pyobjc-framework-WebKit==2.5.1
pyOpenSSL==0.13.1
pyparsing==2.0.1
python-dateutil==1.5
pytz==2013.7
PyYAML==3.11
requests==2.5.3
scipy==0.13.0b1
six==1.4.1
Sphinx==1.2.3
Twisted==13.2.0
urwid==1.3.0
vboxapi==1.0
watchdog==0.8.3
wcwidth==0.1.4
xattr==0.6.4
zope.interface==4.1.1
Tomics-MBP:bpython root#

@sebastinas

This comment has been minimized.

Contributor

sebastinas commented Feb 28, 2015

Upgrade six to 1.5 and bpython should be able to start.

sebastinas added a commit that referenced this issue Feb 28, 2015

Bump six dependency (fixes #494)
from six.moves.X import Y only works with six 1.5 and newer.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
(cherry picked from commit 934c5b6)
@mindprince

This comment has been minimized.

mindprince commented Mar 1, 2015

I have six version 1.9.0 and I am getting the same error with bpython 0.14

Traceback (most recent call last):
  File "/usr/local/bin/bpython", line 9, in <module>
    load_entry_point('bpython==0.14', 'console_scripts', 'bpython')()
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 521, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2632, in load_entry_point
    return ep.load()
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2312, in load
    return self.resolve()
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 2318, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Python/2.7/site-packages/bpython/curtsies.py", line 14, in <module>
    from bpython.curtsiesfrontend.repl import Repl
  File "/Library/Python/2.7/site-packages/bpython/curtsiesfrontend/repl.py", line 32, in <module>
    from bpython.config import (Struct, loadini, default_config_path,
  File "/Library/Python/2.7/site-packages/bpython/config.py", line 9, in <module>
    from six.moves.configparser import ConfigParser
ImportError: No module named configparser
$ pip list

altgraph (0.10.2)
bdist-mpkg (0.5.0)
blessings (1.6)
bonjour-py (0.3)
bpython (0.14)
cffi (0.8.6)
cryptography (0.7.2)
curtsies (0.1.18)
enum34 (1.0.4)
greenlet (0.4.5)
macholib (1.5.1)
matplotlib (1.3.1)
modulegraph (0.10.4)
ndg-httpsclient (0.3.3)
numpy (1.8.0rc1)
pip (6.0.8)
py2app (0.7.3)
pyasn1 (0.1.7)
pycparser (2.10)
Pygments (2.0.2)
pyobjc-core (2.5.1)
pyobjc-framework-Accounts (2.5.1)
pyobjc-framework-AddressBook (2.5.1)
pyobjc-framework-AppleScriptKit (2.5.1)
pyobjc-framework-AppleScriptObjC (2.5.1)
pyobjc-framework-Automator (2.5.1)
pyobjc-framework-CFNetwork (2.5.1)
pyobjc-framework-Cocoa (2.5.1)
pyobjc-framework-Collaboration (2.5.1)
pyobjc-framework-CoreData (2.5.1)
pyobjc-framework-CoreLocation (2.5.1)
pyobjc-framework-CoreText (2.5.1)
pyobjc-framework-DictionaryServices (2.5.1)
pyobjc-framework-EventKit (2.5.1)
pyobjc-framework-ExceptionHandling (2.5.1)
pyobjc-framework-FSEvents (2.5.1)
pyobjc-framework-InputMethodKit (2.5.1)
pyobjc-framework-InstallerPlugins (2.5.1)
pyobjc-framework-InstantMessage (2.5.1)
pyobjc-framework-LatentSemanticMapping (2.5.1)
pyobjc-framework-LaunchServices (2.5.1)
pyobjc-framework-Message (2.5.1)
pyobjc-framework-OpenDirectory (2.5.1)
pyobjc-framework-PreferencePanes (2.5.1)
pyobjc-framework-PubSub (2.5.1)
pyobjc-framework-QTKit (2.5.1)
pyobjc-framework-Quartz (2.5.1)
pyobjc-framework-ScreenSaver (2.5.1)
pyobjc-framework-ScriptingBridge (2.5.1)
pyobjc-framework-SearchKit (2.5.1)
pyobjc-framework-ServiceManagement (2.5.1)
pyobjc-framework-Social (2.5.1)
pyobjc-framework-SyncServices (2.5.1)
pyobjc-framework-SystemConfiguration (2.5.1)
pyobjc-framework-WebKit (2.5.1)
pyOpenSSL (0.14)
pyparsing (2.0.1)
python-dateutil (1.5)
pytz (2013.7)
requests (2.5.3)
scipy (0.13.0b1)
setuptools (12.3)
six (1.9.0)
Twisted (13.2.0)
vboxapi (1.0)
virtualenv (12.0.7)
xattr (0.6.4)
zope.interface (4.1.1)

This error started showing when I upgraded bpython to 0.14

$ sudo pip install --upgraded bpython

.
.
.
Successfully installed PyOpenSSL-0.14 blessings-1.6 bpython-0.14 cffi-0.8.6 cryptography-0.7.2 curtsies-0.1.18 enum34-1.0.4 greenlet-0.4.5 ndg-httpsclient-0.3.3 pyasn1-0.1.7 pycparser-2.10 pygments-2.0.2 requests-2.5.3 six-1.9.0

My previous bpython version was 0.13.1. I am on a Macbook Pro Retina - OS X Yosemite.

@sebastinas

This comment has been minimized.

Contributor

sebastinas commented Mar 1, 2015

Do you have an old six version somewhere on your sys.path? What's the output of % python -c "import six; print(six.__version__)"?

@mindprince

This comment has been minimized.

mindprince commented Mar 1, 2015

Indeed.

$ python -c "import six; print(six.__version__)"
1.4.1

Any idea how to fix this?

@sebastinas

This comment has been minimized.

Contributor

sebastinas commented Mar 1, 2015

Remove the old copy or put the new one earlier on your sys.path.

@mindprince

This comment has been minimized.

mindprince commented Mar 1, 2015

Thanks!
The old copy is in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/ and the new one is getting placed at /Library/Python/2.7/site-packages/ which is after the first one in sys.path. The first copy seems to be placed there by Apple - I am wondering if removing that would break anything.

@dsabrinarg

This comment has been minimized.

dsabrinarg commented Mar 31, 2015

I use

$ sudo easy_install bpython

And now works, hope this helps, regards!

@cpenner-va

This comment has been minimized.

cpenner-va commented May 4, 2015

Adding this to my .bash_profile solved this issue for me.

export PYTHONPATH=/Library/Python/2.7/site-packages/:$PYTHONPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment