|
发表于 2018-3-13 21:22:33
|
显示全部楼层
1、按照教程,多次尝试。执行到最后,应该有错误。请教错在哪里?
2、请教各位,我是linux小白,多多指点。
* Documentation: https://help.ubuntu.com/
Ubuntu 16.04 LTS [running via Linux Deploy]
Last login: Tue Mar 13 12:37:51 2018 from 192.168.21.101
android@localhost:~$ sudo apt-get install nano
Reading package lists... Done
Building dependency tree
Reading state information... Done
nano is already the newest version (2.5.3-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
android@localhost:~$ sudo apt-get install -y python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (8.1.1-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
android@localhost:~$ sudo mkdir /root/.pip
mkdir: cannot create directory '/root/.pip': File exists
android@localhost:~$ sudo sh -c "echo '[global]\nindex-url = http://mirrors.ustc.edu.cn/pypi/web/simple/' > /root/.pip/pip.conf"
android@localhost:~$ sudo pip3 install -U pip
The directory '/home/android/.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/android/.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 up-to-date: pip in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo -H pip install -U pip
The repository located at mirrors.ustc.edu.cn is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host mirrors.ustc.edu.cn'.
Requirement already up-to-date: pip in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo -H pip install -U pip --trusted-host mirrors.ustc.edu.cn
Requirement already up-to-date: pip in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo pip3 install virtualenv
The directory '/home/android/.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/android/.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: virtualenv in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo -H pip3 install virtualenv
Requirement already satisfied: virtualenv in /usr/local/lib/python3.5/dist-packages
android@localhost:~$ sudo useradd -rm homeassistant
useradd: user 'homeassistant' already exists
android@localhost:~$ sudo chown homeassistant:homeassistant /srv/homeassistant
android@localhost:~$ sudo mkdir /home/homeassistant/.pip
mkdir: cannot create directory '/home/homeassistant/.pip': File exists
android@localhost:~$ sudo sh -c "echo '[global]nindex-url = https://mirrors.ustc.edu.cn/pypi/web/simple/' > /home/homeassistant/.pip/pip.conf"
android@localhost:~$ sudo chown -R homeassistant:homeassistant /home/homeassistant/.pip
android@localhost:~$ sudo su -s /bin/bash homeassistant
homeassistant@localhost:/home/android$ virtualenv -p python3 /srv/homeassistant
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /srv/homeassistant/bin/python3
Not overwriting existing python script /srv/homeassistant/bin/python (you must use /srv/homeassistant/bin/python3)
Installing setuptools, pip, wheel...done.
|
|