无法安装python软件包";“汤姆”;

无法安装python软件包";“汤姆”;,python,numpy,Python,Numpy,我是下面的接口ROS和露台 当我跑的时候 使posix_sitl_成为默认露台 我使用的是Ubuntu 16.04,所以我使用的是sudo pip install numpy toml,但是: The directory '/home/nando/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the pe

我是下面的接口ROS和露台

当我跑的时候

使posix_sitl_成为默认露台

我使用的是Ubuntu 16.04,所以我使用的是sudo pip install numpy toml,但是:

The directory '/home/nando/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nando/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in /opt/anaconda/lib/python2.7/site-packages
Requirement already satisfied: toml in /opt/anaconda/lib/python2.7/site-packages
显然,我已经满足了需求,但在运行第一个命令时,我一直收到相同的错误消息。
如何解决这个问题?

显然,问题是我有python 2和3,我在3中安装了toml。 运行:


为我解决了这个问题

我通过使用pip3安装toml解决了这个问题

您是否尝试过使用Root用户或sudo运行它?我刚刚完成了,但收到了完全相同的错误。
如果使用sudo执行pip,您可能需要sudo的-H标志
。您也试过了吗?是的,这将删除两个警告,并直接转到已经满足的要求。
The directory '/home/nando/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nando/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: numpy in /opt/anaconda/lib/python2.7/site-packages
Requirement already satisfied: toml in /opt/anaconda/lib/python2.7/site-packages
sudo -H pip2 install toml