我正在尝试为 python3.x 安装 scipy,我正在尝试使用 pip3 安装它
sudo pip3 install scipy
Run Code Online (Sandbox Code Playgroud)
但我有以下错误:
Downloading/unpacking scipy
Running setup.py (path:/tmp/pip_build_root/scipy/setup.py) egg_info for package scipy
warning: no previously-included files matching '*_subr_*.f' found under directory 'scipy/linalg/src/id_dist/src'
no previously-included directories found matching 'scipy/special/tests/data/boost'
no previously-included directories found matching 'scipy/special/tests/data/gsl'
no previously-included directories found matching 'doc/build'
no previously-included directories found matching 'doc/source/generated'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.bak' …Run Code Online (Sandbox Code Playgroud) 我使用 apt-get install python3-pip 安装了 pip3 但是当我尝试安装任何软件包时,我遇到了这种类型的错误。
xxxxx@xxx:~$ pip3 install requests
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip3')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 521, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2632, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2312, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2318, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 74, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python3/dist-packages/pip/vcs/mercurial.py", line 9, …Run Code Online (Sandbox Code Playgroud) 我对 Linux 的经验很少,所以我需要一点帮助!
我正在尝试为python3.2安装python mysql-connector,我能够使用pip通过'pip install mysql-connector'为python2.7安装它。要为 python 3 安装它,我相信你必须使用 python3 pip 而不是 python2 pip,我在某处读过,但我不确定它是否正确,python3 pip 是否知道获得正确的连接器,或者你是否必须指定特定版本,如“pip install mysql-connector1.2”。
无论如何,我发现很难获得 py3 pip,然后我遇到了一篇建议使用“virtualenv”的帖子,以便更轻松地使用不同版本的 python。这个帖子:
如何在 ubuntu 12.04 LTS 中为 python 3 安装 pip
说创建虚拟环境,激活它,然后继续pip install你需要的任何包。但是,当我进行 pip install 时,它似乎没有获得我需要的 mysql-connector,并且从 virtualenv 内部运行 'pip --version' 它告诉我正在使用 python2.7 pip。
我尝试了其他方法来尝试获取 pip3,例如“easy-install pip3”,这似乎也不起作用。
这是获得正确 mysql-connector 的唯一途径吗?还是有另一种方法可以获得 pip3(对于 py3.2)?
谢谢,非常感谢任何建议!
我有支持 python-2.7 和 python-3 的 Ubuntu 14.04。我正在将我的 python 应用程序从 python-2.7 移植到 python-3。我有example.py正在导入以下模块的文件。而我#!/usr/bin/python3作为 python evn 变量。
import gtk, gobject, time, sys, os, subprocess, signal
**ImportError: No module named 'gtk'**
Run Code Online (Sandbox Code Playgroud)
尝试使用python3运行时出现上述错误。
知道这里缺少什么吗?
我最近安装了 Ubuntu 16.04 并在发行说明中说
VIM 默认为 python3
在我全新安装的 Ubuntu 16.04 中,我使用以下命令安装了 vim
$ python3 -V
Python 3.5.1+
$ vim
The program 'vim' can be found in the following packages:
vim
...
$ sudo apt install vim
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 08 2016 11:38:28)
Included patches: 1-1689
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by pkg-vim-maintainers@lists.alioth.debian.org
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +tag_binary
+arabic +file_in_path +mouse_sgr …Run Code Online (Sandbox Code Playgroud) 当我尝试在 Ubuntu 16.04 上使用 pip3 安装 tensorflow 包时,我收到了以下错误消息:
目录“/home/federico/.cache/pip/http”或其父目录不属于当前用户所有并且缓存已被禁用。请检查该目录的权限和所有者。如果使用 sudo 执行 pip,您可能需要 sudo 的 -H 标志。 目录“/home/federico/.cache/pip”或其父目录不属于当前用户所有,并且缓存轮已被禁用。检查该目录的权限和所有者。如果使用 sudo 执行 pip,您可能需要 sudo 的 -H 标志。 tensorflow-0.7.1-cp34-none-linux_x86_64.whl 在此平台上不受支持。
我该如何解决问题?
我无法在 Ubuntu 16.04 上安装或升级任何东西。我缺少软件包 python3-software-properties 并且无论如何都无法安装它。我已经发布了各种回溯。我尝试安装这些软件包并出现这些错误。
sarfraz@sarfraz:~$ sudo apt-get install --reinstall dpkg
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
language-selector-common language-selector-gnome python3-distupgrade
python3-software-properties software-properties-common software- properties-gtk
Recommended packages:
unattended-upgrades
The following packages will be upgraded:language-selector-common
language-selector-gnome python3-distupgrade python3-software-
properties software-properties-common software-properties-gtk
6 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 30 not upgraded.
141 not fully installed or removed.
Need to get 2,083 kB/2,496 kB of archives. …Run Code Online (Sandbox Code Playgroud) 我正在使用 Ubuntu 17.10,我想在其上安装 OpenCV 3。
如何在 Ubuntu 17.10 上为 Python 3 安装 OpenCV?
我在我的 ubuntu 18.04 系统上安装了几次 python,并尝试卸载所有必要的,然后正确地重新安装 python3.6
所以我删除了 下列出的所有文件夹,这whereis python可能是一个坏主意。
现在如果我运行sudo apt-get install python3.6它返回
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.6 is already the newest version (3.6.5-3).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python3.6-minimal (3.6.5-3) ...
Could not find …Run Code Online (Sandbox Code Playgroud) 在 Ubuntu 16.04 上,我从 deadsnakes PPA 安装了 Python 3.6。现在我升级到 Ubuntu 18.04,它构建在 Python 3.6 之上,但它没有删除旧版本的 Python 3.6,而是保留了 deadsnakes PPA 中的版本,如果我想安装任何与 python 相关的东西,这会导致依赖性问题。例如,如果我运行sudo apt install python3.6-venv:
The following packages have unmet dependencies:
python3.6-venv : Depends: python3.6 (= 3.6.5-3) but 3.6.6-1+xenial1 is to be installed
Run Code Online (Sandbox Code Playgroud)
有没有一种安全的方法可以在3.6.6-1+xenial1不删除依赖于它来安装默认 Python 3.6 的所有内容的情况下进行删除?否则,我将不得不从头开始重新安装 Ubuntu。
使用 apt-get 无法安装相关问题,python 丢失不幸的是,给出的唯一答案建议手动删除并重新安装 python3.6,这将导致删除大约 218 个包。这是我想规避的。sudo apt-get remove python3.6:
The following packages will be REMOVED:
apparmor apport apport-gtk aptdaemon apturl apturl-common asymptote atom …Run Code Online (Sandbox Code Playgroud)