【发布时间】:2018-12-11 21:46:15
【问题描述】:
在 Ubuntu 14.04 上,我使用 Pycharm 专业版。当我启动调试会话时,我在 Pycharm 的事件日志中看到以下消息:
Python 调试器扩展可用
Cython 扩展加速 Python 调试
单击Install 会弹出一个带有错误消息的窗口:
我在这里也画了文字,以便其他人更容易找到它:
编译 Cython 扩展错误
非零退出代码(1):
无法执行“gcc”:没有这样的文件或目录
错误:命令“gcc”失败,退出状态为 1
寻找解决方案:
我根据上面提到的链接手动编译了 Cython 加速:
/usr/bin/python3 /<PYCHARM_INSTALLATION_PATH>/helpers/pydev/setup_cython.py build_ext --inplace。这成功完成,但对错误消息没有帮助。-
我添加了 python-3.6-dev 存储库:
sudo add-apt-repository ppa:deadsnakes/ppa,执行:sudo apt-get update && sudo apt-get dist-upgrade并安装了 python-3.6-dev:sudo apt-get install python3.6-dev成功完成,但不会改变上面的弹出错误信息。
我还能检查或执行什么?
编辑 关于 gcc 的安装,如下所示:
user@user-computer:~$ gcc
The program 'gcc' is currently not installed. You can install it by typing:
sudo apt-get install gcc
user@user-computer:~$ sudo apt-get install gcc
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
The following packages were automatically installed and are no longer required:
libseccomp2 libwireshark5 libwiretap4 libwsutil4
linux-image-3.13.0-160-generic linux-image-extra-3.13.0-160-generic
linux-lts-xenial-tools-4.4.0-137 linux-signed-image-4.4.0-137-generic
linux-tools-4.4.0-137-generic squashfs-tools
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
user@user-computer:~$ gcc
The program 'gcc' is currently not installed. You can install it by typing:
sudo apt-get install gcc
【问题讨论】:
-
你有安装 gcc 吗?
-
@Dinari :我扩展了关于安装
gcc的问题。 -
在完成
sudo apt install --reinstall gcc之后就可以了 -
感谢您的好提示。欢迎回答我的问题。