首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >成功安装apt-get或pip后,软件包不可用

成功安装apt-get或pip后,软件包不可用
EN

Ask Ubuntu用户
提问于 2019-08-13 12:32:53
回答 1查看 91关注 0票数 2

我正试图在我的Ubuntu机器上安装一些库。以这个库为例

代码语言:javascript
复制
ubuntu@ip-172-31-44-172:~$ sudo apt install virtualenv
Reading package lists... Done
Building dependency tree... 50%
Building dependency tree       
Reading state information... Done
virtualenv is already the newest version (15.0.1+ds-3ubuntu1).
The following package was automatically installed and is no longer required:
  libllvm4.0
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ubuntu@ip-172-31-44-172:~$ 

但现在当我尝试使用virtualenv时,我得到-

代码语言:javascript
复制
ubuntu@ip-172-31-44-172:~$ virtualenv
The program 'virtualenv' is currently not installed. You can install it by typing:
sudo apt install virtualenv

“pip3”库也一样

代码语言:javascript
复制
ubuntu@ip-172-31-44-172:~$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pip is already the newest version (8.1.1-2ubuntu0.4).
The following package was automatically installed and is no longer required:
  libllvm4.0
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ubuntu@ip-172-31-44-172:~$

ubuntu@ip-172-31-44-172:~$ pip3
The program 'pip3' is currently not installed. You can install it by typing:
sudo apt install python3-pip

这里有什么问题?

EN

回答 1

Ask Ubuntu用户

发布于 2019-08-13 14:13:58

我通过卸载和重新安装上述所有库来修复这个问题。

代码语言:javascript
复制
sudo apt-get purge virtualenv
sudo apt-get purge python3-pip

然后我又重新安装了这些。我认为问题可能是-我将默认的python版本从2.7改为3.5。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1165417

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档