标签:image 学习 nis 打开 ble ssi google 分享 tmp
刚开始学习python的时候使用的ipython解释器,挺好用的,后来发现bpython功能更强大,linux系统中安装基本没啥问题,不过在windows下安装倒是不容易啊。使用google搜了一下, 发现bpython-curses这个命令可以运行,参考了这个网址的https://github.com/bpython/bpython/issues/509官方对window安装的说明:https://docs.bpython-interpreter.org/windows.html
下面我整理下正确的安装方法。
C:\Users\Administrator>pip install bpython #请确认你的pip已经安装并且配置到环境变量path中去了。 这里pip可以换成easy_install, conda
C:\Users\Administrator>bpython Traceback (most recent call last): File "e:\program files\python36\lib\runpy.py", line 193, in _run_module_as_mai n "__main__", mod_spec) File "e:\program files\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "E:\Program Files\Python36\Scripts\bpython.exe\__main__.py", line 5, in < module> File "e:\program files\python36\lib\site-packages\bpython\curtsies.py", line 9 , in <module> import curtsies File "e:\program files\python36\lib\site-packages\curtsies\__init__.py", line 4, in <module> from .window import FullscreenWindow, CursorAwareWindow File "e:\program files\python36\lib\site-packages\curtsies\window.py", line 11 , in <module> import blessings File "e:\program files\python36\lib\site-packages\blessings\__init__.py", line 5, in <module> import curses File "e:\program files\python36\lib\curses\__init__.py", line 13, in <module> from _curses import * ModuleNotFoundError: No module named ‘_curses‘
#去这个网站找到对应版本的curses下载下来,http://www.lfd.uci.edu/~gohlke/pythonlibs/#curses ,这个包暂时pip没法去下载它,需要手工下载后再使用pip 安装 C:\Users\Administrator>pip install E:\tmp\curses-2.2-cp36-cp36m-win_amd64.whl
C:\Users\Administrator>bpython Traceback (most recent call last): File "e:\program files\python36\lib\runpy.py", line 193, in _run_module_as_mai n "__main__", mod_spec) File "e:\program files\python36\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "E:\Program Files\Python36\Scripts\bpython.exe\__main__.py", line 5, in < module> File "e:\program files\python36\lib\site-packages\bpython\curtsies.py", line 9 , in <module> import curtsies File "e:\program files\python36\lib\site-packages\curtsies\__init__.py", line 4, in <module> from .window import FullscreenWindow, CursorAwareWindow File "e:\program files\python36\lib\site-packages\curtsies\window.py", line 11 , in <module> import blessings File "e:\program files\python36\lib\site-packages\blessings\__init__.py", line 7, in <module> from fcntl import ioctl ModuleNotFoundError: No module named ‘fcntl‘
我的bpyton的安装位置是在E:\Program Files\Python36\Scripts ,我们不启动bpython 启动bpython-curses试试。
C:\Users\Administrator>bpython-curses #可以运行了。
进入我们的E:\Program Files\Python36\Scripts目录,把bpython.exe,bpython-curses.exe先备份一下,然后删除bpython.exe, 修改bpython-curses.exe 为bpython.exe
可以愉快的使用bpython了。
标签:image 学习 nis 打开 ble ssi google 分享 tmp
原文地址:http://www.cnblogs.com/zhaojiedi1992/p/zhaojiedi_python_006_bpython.html