我使用CentOS8.0并希望安装最新的Python 3。
当我运行yum命令时,它告诉我
yum: command not found
但是当我运行rpm -q yum时,我就拥有了yum-4.7.0-4.el8.noarch。
然后我试着which yum我得到
/usr/bin/which: no yum in (/root/.vscode-server/bin/xxx/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin)
这个问题发生在我卸载一个旧的Python版本之后
我正在尝试安装用于python3的gi软件包(dropbox需要它)。我知道:
$ sudo apt install python3-gi
并得到:
python3-gi is already the newest version (3.36.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
但当我这么做的时候
$ python3 -m gi
我得到:
/usr/local/bin/python3: No module named gi
我不使用anaconda或virtualenv。如何正确安装gi?
在新安装的Ubuntu (Ubuntu20.04.1LTS)上,Python 3.9.1有问题--当运行任何基于tkinter的应用程序时,我会得到导入错误(例如来自python控制台):
user@ubuntu:~$ python3
Python 3.9.1 (default, Dec 29 2020, 13:25:02)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
&g
我试图在我的Linux虚拟机(Ubuntu 20.04)上通过pip安装couchdb,但我得到了以下错误。 cc@team5-vm1-2:~$ pip install couchdb
Defaulting to user installation because normal site-packages is not writeable
ERROR: Exception:
Traceback (most recent call last):
File "/home/cc/.local/lib/python3.8/site-packages/pip/_internal/cli/b
我正在使用来自brew install python3的python 3.5.2发行版,当我开始空闲时,我收到以下错误消息:
WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.
在访问python.org的之后,我安装了8.5.18版本的ActiveTcl。
接下来,按照中的信息,我使用brew uninstall python3卸载了python3,然后使用brew inst
我正在尝试将.py文件转换为可执行文件。我的文件hello.py写道:
print "Hello, World!"
我目前正在尝试使用pyinstaller。但是,当我运行该命令时
pyinstaller hello.py
我收到错误消息"tuple index out of range“,我被告知这意味着我的python版本不受支持。特别是,看起来pyinstaller认为我正在尝试将python3.6代码编译成可执行文件。但是我已经安装了python 2.7和python 3.6。如何让它知道我想让它将代码视为python2.7代码?
不知何故,我设法搞乱了我的全新MacOS Catalina安装的系统范围的Python3安装。问题出在pip -我用sudo pip3 install --upgrade pip升级了系统pip版本。这样做之后,我收到来自pip的错误消息: WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the und
我尝试在Buildozer VM上构建apk [ERROR]: Build failed: python-for-android no longer supports running
under Python 2. Either upgrade to Python 3.4 or higher (recommended), or
revert to python-for-android 2019.07.08. Note that you *can* still target
Python 2 on Android by including python2 in your requir
我正在尝试在我的macOS机器(10.14.4)上安装Certbot来生成证书,但是像往常一样,一些自制的错误阻碍了我的工作。 在运行brew update和brew install certbot之后,我尝试了一个基于sudo certbot certonly -a manual -d example.com --email your@email.com的命令,但得到了sudo: certbot: command not found。我也尝试过brew upgrade。 brew doctor显示: Warning: The following directories do not exi
我在运行我在IntelliJ中输入的任何kivy代码时都遇到了同样的错误。我使用的是kivy 2.0.0和python 3.9。下面是我的代码: import kivy
kivy.require("2.0.0")
from kivy.app import App
from kivy.uix.button import Button
print(kivy.__version__)
class ButtonApp(App):
def build(self):
# use a (r, g, b, a) tuple
btn = But
我目前正在努力能够在python脚本中导入Bio模块,该脚本位于不同的目录中。
我一直收到的错误如下:
from Bio import SeqIO
ImportError: No module named 'Bio'
我已经尝试重新安装Biopython,重新构建它,并更改路径(正如Stackoverflow上所有建议的那样,但我仍然收到此错误消息。
我根据pypi.python.org站点的说明构建了Biopython:
python setup.py build
python setup.py test
sudo python setup.py install
对于Pyt
我已经尝试使用以下三个命令来安装django。现在,当我执行django-amdin命令时,它会显示下面的错误。甚至我也看不到django-admin --版本。
sudo apt install python3.8
sudo apt-get install python3-pip
pip3 install Django ( Its successfully installed )
Now when i execute any command related to django-admin then its showing below error:
Error is :
Traceback
我使用ParroOSv4.7,Pyinstaller有一个问题(依赖关系问题,但所有的依赖项都实现/安装了),所以我搜索并尝试卸载和重新安装Python3。
我跑了
apt-get remove python3
但是它也开始移除其他软件包,现在计算机不能正常工作了。
删除:
Mate-interfacebluefish
截图不起作用,上面写着:
Failed to execute child process “mate-screenshot” (No such file or directory))
dashboard
和许多其他软件包,系统已经不能像以前那样工作了。
现在,当我试图重新安
我只是想快速测试一下。所以我运行了一个docker容器,我想检查一下我运行的是哪个版本: $ docker run -it ubuntu
root@471bdb08b11a:/# lsb_release -a
bash: lsb_release: command not found
root@471bdb08b11a:/# 所以我试着安装它(作为suggested here): root@471bdb08b11a:/# apt install lsb_release
Reading package lists... Done
Building dependency tree
当我试图安装PyPI模块lbcapi (sudo pip install lbcapi)时,会遇到以下消息:
Collecting lbcapi
Could not find a version that satisfies the requirement lbcapi (from versions: )
No matching distribution found for lbcapi
会有什么问题吗?我看到的是Python 2和Python 3。
Traceback (most recent call last):
File "extract_C3D_feature.py", line 7, in <module>
import numpy as np
File "/usr/local/lib/python2.7/dist-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/usr/local/lib/python2.7/dist-packag