小编che*_*fei的帖子

'PyDevTerminalInteractiveShell'对象没有属性'has_readline'

我使用Pycharm 2016.1CentOS7,我测试" Show command line afterwards",我得到了这个问题:

AttributeError: 'PyDevTerminalInteractiveShell' object has no attribute 'has_readline'
Run Code Online (Sandbox Code Playgroud)
/usr/bin/python3.4 /usr/local/pycharm/helpers/pydev/pydev_run_in_console.py 37196 52554 /root/PycharmProjects/mytf/mytest/test5.py
Traceback (most recent call last):
File "/usr/local/pycharm/helpers/pydev/pydev_run_in_console.py", line 63, in <module>
  interpreter = InterpreterInterface(host, int(client_port), threading.currentThread())
File "/usr/local/pycharm/helpers/pydev/_pydev_bundle/pydev_ipython_console.py", line 26, in __init__
  self.interpreter = get_pydev_frontend(host, client_port, show_banner=show_banner)
File "/usr/local/pycharm/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 473, in get_pydev_frontend
  _PyDevFrontEndContainer._instance = _PyDevFrontEnd(show_banner=show_banner)
File "/usr/local/pycharm/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 303, in __init__
  self.ipython = PyDevTerminalInteractiveShell.instance()
File "/usr/lib/python3.4/site-packages/traitlets/config/configurable.py", line 412, in instance
  inst = cls(*args, **kwargs)
File "/usr/lib/python3.4/site-packages/IPython/terminal/interactiveshell.py", …
Run Code Online (Sandbox Code Playgroud)

python pycharm

37
推荐指数
3
解决办法
1万
查看次数

scipy.misc.imshow RuntimeError('无法执行图像视图')

我正在测试scipy.misc.imshow,我得到RuntimeError:无法执行图像查看器.

我正在使用Python3.4并在CentOS 7上运行它.

import scipy.misc
img = scipy.misc.imread('Data/cat.jpg')
assert len(img.shape) == 3
img_resized = scipy.misc.imresize(img, (224, 224))
img_answer = (img_resized/255.0).astype('float32')
scipy.misc.imshow(img_answer)
Run Code Online (Sandbox Code Playgroud)

我收到一个错误:

sh: see: command not found
Traceback (most recent call last):
  File "/usr/local/pycharm/helpers/pydev/pydev_run_in_console.py", line 71, in <module>
    globals = run_file(file, None, None)
  File "/usr/local/pycharm/helpers/pydev/pydev_run_in_console.py", line 31, in run_file
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/usr/local/pycharm/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/root/PycharmProjects/myVQA/testgood.py", line 6, in <module>
    scipy.misc.imshow(img_answer)
  File "/usr/lib64/python3.4/site-packages/scipy/misc/pilutil.py", …
Run Code Online (Sandbox Code Playgroud)

python image scipy imshow centos7

6
推荐指数
2
解决办法
7599
查看次数

标签 统计

python ×2

centos7 ×1

image ×1

imshow ×1

pycharm ×1

scipy ×1