我使用的是 Ubuntu 13.10。我有 python 2.7 和 python 3.3。我已经在 python 2.7 中正确安装了 pygame。我如何在 python3.3 中安装它。pygame 是否支持 python3.3?
我使用从这里获取的以下命令安装了 Python scipy 堆栈
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
Run Code Online (Sandbox Code Playgroud)
不过,我可以导入sympy只有在Python 2.7.6这时候我输入默认的Python版本python的终端。当我开始Python 3.4.0输入时python3,import sympy语句抛出错误
>>> import sympy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'sympy'
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
这是我第一次使用 ubuntu,所以我还不知道如何很好地使用它......我如何安装 python 3.5.2 ?它已经有了 2.7.12 版本。我的 Ubuntu 版本是 Ubuntu 16.04 LTS(桌面)。
每当我打开终端时,我都必须写
export PATH=~/anaconda3/bin:$PATH
Run Code Online (Sandbox Code Playgroud)
使用 anaconda 的任何功能
我想要一条持久的道路。
由于Python 3.7已经上线,我想问一下Ubuntu 18.04什么时候会更新Python3的版本?
我已将 python 升级到 3.7 版,现在我的终端没有打开。
我关注了这篇文章https://jcutrer.com/linux/upgrade-python37-ubuntu1810
我运行的命令如下,
sudo apt-get install python3.7
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2
sudo update-alternatives --config python3
Run Code Online (Sandbox Code Playgroud)
为python3.7输入2
我无法打开终端并运行命令。
我的 ubuntu 版本是 Ubuntu 18.04.2 LTS
我正在使用 Docker,我的dockerfile是:
######################################################
FROM ubuntu:20.04
WORKDIR /opt/test
# Apt installs
RUN apt update
######################################################
Run Code Online (Sandbox Code Playgroud)
如果我构建并运行容器,然后运行以下命令,它会要求安装 python3-minimal 和 Python 依赖项:
$ docker run -it ubuntu-test
root@3a13a90d3e86:/opt/test# apt install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
alsa-topology-conf alsa-ucm-conf file libasound2 libasound2-data libcanberra0 libexpat1 libgpm2 libltdl7 libmagic-mgc libmagic1 libmpdec2 libogg0 libpython3.8 libpython3.8-minimal libpython3.8-stdlib libreadline8 libsqlite3-0
libssl1.1 libtdb1 libvorbis0a libvorbisfile3 mime-support readline-common sound-theme-freedesktop vim-common vim-runtime xxd xz-utils
Suggested packages:
libasound2-plugins …Run Code Online (Sandbox Code Playgroud) 我已在 Windows 10 上成功设置 WSL。我还成功下载并安装了 Python3。但是,我无法获得点。我如何获得点?
gyu@LAPTOP-PR3:/mnt/c/Windows/system32$ python3 --version
Python 3.8.2
gyu@LAPTOP-PR3:/mnt/c/Windows/system32$ python3 -m pip list
/usr/bin/python3: No module named pip
gyu@LAPTOP-PR3:/mnt/c/Windows/system32$ sudo apt-get install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python3-pip' has no installation candidate
gyu@LAPTOP-PR3:/mnt/c/Windows/system32$ sudo apt-get install python-pip
Reading …Run Code Online (Sandbox Code Playgroud) 我有一个 python3.4 脚本。我想向桌面发送通知。我如何在python中处理这个?我可以使用通知发送吗?
我正在使用 Ubuntu 14.04。
#in my script
if something:
notify-send 'Here is a notification !'
Run Code Online (Sandbox Code Playgroud) 我有一个运行 Ubuntu 16.04.6 LTS 的虚拟机。默认情况下Python 3.5.2
并且,我按照以下过程安装了 Python 3.8:
wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
tar xzf Python-3.8.0
cd Python-3.8.0
sudo ./configure --enable-optimizations
sudo make altinstall
Run Code Online (Sandbox Code Playgroud)
由于我将安装 miniconda 并且我想避免任何冲突,我想知道如何卸载它。
到目前为止我已经尝试过:
sudo apt-get purge python3.8 AND
sudo apt-get --purge remove python3.8
Run Code Online (Sandbox Code Playgroud)
最后我错误地删除了包含它的文件夹:(
但我仍然拥有它。检查图像。
可以卸载吗?我以后会有什么问题吗?
谢谢