我正在使用Python 2和Python 3.我正在努力使pylab
变体ipython
在Python 3上运行(因为它在Python 2上运行良好)。
无法安装PyQt4
后,我尝试使用以下PySide
命令安装pip
install:
sudo pip -vvv install --upgrade pyside
花了一段时间。我的电脑也很热。但达到100%后,安装失败并显示以下错误消息:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-o8v5e0ej/pyside/setup.py", line 1001, in <module>
ext_package = 'PySide',
File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-build-o8v5e0ej/pyside/setup.py", line 245, in run
raise RuntimeError("Can't find '%s'" % (filename,))
RuntimeError: Can't find '/usr/bin/pyside_postinstall.py'
----------------------------------------
Cleaning up...
Removing source in /tmp/pip-build-o8v5e0ej/pyside [85/929]
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-o8v5e0ej/pyside/setup.py';exec(compile(getattr(tokenize, 'open', open)(__fil
e__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1z4uq1n8-record/install-record.txt --single-version-externally-managed --compi
le" failed with error code 1 in /tmp/pip-build-o8v5e0ej/pyside
Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/usr/local/lib/python3.4/dist-packages/pip/commands/install.py", line 299, in run
root=options.root_path,
File "/usr/local/lib/python3.4/dist-packages/pip/req/req_set.py", line 646, in install
**kwargs
File "/usr/local/lib/python3.4/dist-packages/pip/req/req_install.py", line 862, in install
show_stdout=False,
File "/usr/local/lib/python3.4/dist-packages/pip/utils/__init__.py", line 732, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-o8v5e0ej/pyside/setup.py';exec(compile(get
attr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1z4uq1n8-record/install-record.txt --single-
version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-o8v5e0ej/pyside
总而言之,pylab
对我没有帮助。正在运行ipython --pylab
加注
ImportError: libpyside.cpython-34m.so.1.2: cannot open shared object file: No such file or directory
这是行
的结果from PySide import QtCore, QtGui, __version__, __version_info__
我做错了吗?
我的系统信息:
答案 0 :(得分:0)
我不完全确定这是对我的问题的正确答案,因为它并没有真正解决pip
的问题,但我已经成功解决了我的机器上的pylab
问题,并且这就是我所做的:
aptitude
) python3-pyqt4
和python3-pyqt5
pip
)python
pyside
aptitude
)python3-pyside
现在ipython --pylab
有效(使用Python 3.4.0)。