pip没有完全从requirements.txt安装包

时间:2018-04-08 01:01:47

标签: python raspberry-pi

我正在尝试从raspberry pi上的requirements.txt文件安装python依赖项。这在我最初测试它的ubuntu VM映像上运行良好,所以我有点困惑。

当我运行-v

pip3 install -v -r requirements.txt

输出中没有错误,所以我添加了pip3 show <pick a package from my requirements.txt file>标志并再次运行:

certifi==2017.11.5 chardet==3.0.4 coverage==4.4.2 Django==2.0.1 gitdb2==2.0.3 GitPython==2.1.9 gunicorn==19.7.1 idna==2.6 netifaces==0.10.6 nose==1.3.7 psycopg2==2.7.3.2 python-nmap==0.6.1 pytz==2017.3 requests==2.18.4 simplejson==3.13.2 smmap2==2.0.3 urllib3==1.22 xml2json==0.1

几乎相同的输出,包括你期望找到正确的包,连接到源等的所有东西。

确认未安装任何软件包:

> pip install certifi Collecting certifi Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB) 100% |████████████████████████████████| 153kB 187kB/s Installing collected packages: certifi Successfully installed certifi-2018.1.18

只返回没有输出的提示。

那么,我只是下载包而不安装它们?怎么了?

这是我的要求文件:

pip install certifi

但是,如果我尝试逐个安装软件包,它可以正常工作:

pip install chardet

所以,我不认为这是一个依赖性问题。

以下是完整的输出,请注意,我已经尝试过运行一次并下载了软件包,然后我运行了root@omniscanner:~# pip3 install -r /opt/omnicron-scanner/requirements.txt Collecting certifi==2017.11.5 (from -r /opt/omnicron-scanner/requirements.txt (line 1)) Using cached certifi-2017.11.5-py2.py3-none-any.whl Requirement already satisfied: chardet==3.0.4 in /usr/local/lib/python3.5/dist-packages (from -r /opt/omnicron-scanner/requirements.txt (line 2)) Collecting coverage==4.4.2 (from -r /opt/omnicron-scanner/requirements.txt (line 3)) Using cached https://www.piwheels.org/simple/coverage/coverage-4.4.2-cp35-cp35m-linux_armv6l.whl Collecting Django==2.0.1 (from -r /opt/omnicron-scanner/requirements.txt (line 4)) Using cached Django-2.0.1-py3-none-any.whl Collecting gitdb2==2.0.3 (from -r /opt/omnicron-scanner/requirements.txt (line 5)) Using cached gitdb2-2.0.3-py2.py3-none-any.whl Collecting GitPython==2.1.9 (from -r /opt/omnicron-scanner/requirements.txt (line 6)) Using cached GitPython-2.1.9-py2.py3-none-any.whl Collecting gunicorn==19.7.1 (from -r /opt/omnicron-scanner/requirements.txt (line 7)) Using cached gunicorn-19.7.1-py2.py3-none-any.whl Collecting idna==2.6 (from -r /opt/omnicron-scanner/requirements.txt (line 8)) Using cached idna-2.6-py2.py3-none-any.whl Collecting netifaces==0.10.6 (from -r /opt/omnicron-scanner/requirements.txt (line 9)) Using cached https://www.piwheels.org/simple/netifaces/netifaces-0.10.6-cp35-cp35m-linux_armv6l.whl Collecting nose==1.3.7 (from -r /opt/omnicron-scanner/requirements.txt (line 10)) Using cached nose-1.3.7-py3-none-any.whl Collecting psycopg2==2.7.3.2 (from -r /opt/omnicron-scanner/requirements.txt (line 11)) Using cached https://www.piwheels.org/simple/psycopg2/psycopg2-2.7.3.2-cp35-cp35m-linux_armv6l.whl Collecting python-nmap==0.6.1 (from -r /opt/omnicron-scanner/requirements.txt (line 12)) Using cached https://www.piwheels.org/simple/python-nmap/python_nmap-0.6.1-py3-none-any.whl Collecting pytz==2017.3 (from -r /opt/omnicron-scanner/requirements.txt (line 13)) Using cached pytz-2017.3-py2.py3-none-any.whl Collecting requests==2.18.4 (from -r /opt/omnicron-scanner/requirements.txt (line 14)) Using cached requests-2.18.4-py2.py3-none-any.whl Collecting simplejson==3.13.2 (from -r /opt/omnicron-scanner/requirements.txt (line 15)) Using cached https://www.piwheels.org/simple/simplejson/simplejson-3.13.2-cp35-cp35m-linux_armv6l.whl Collecting smmap2==2.0.3 (from -r /opt/omnicron-scanner/requirements.txt (line 16)) Using cached smmap2-2.0.3-py2.py3-none-any.whl Collecting urllib3==1.22 (from -r /opt/omnicron-scanner/requirements.txt (line 17)) Using cached urllib3-1.22-py2.py3-none-any.whl Collecting xml2json==0.1 (from -r /opt/omnicron-scanner/requirements.txt (line 18)) Could not find a version that satisfies the requirement xml2json==0.1 (from -r /opt/omnicron-scanner/requirements.txt (line 18)) (from versions: 1.1) No matching distribution found for xml2json==0.1 (from -r /opt/omnicron-scanner/requirements.txt (line 18)) &amp;手动App以显示命令在仅尝试一次安装一个包时起作用:

 1  import React from "react";
 2  import gql from "graphql-tag";
 3  import { graphql, Query } from 'react-apollo';
 4  import { withApollo } from "react-apollo";
 5  import ResolutionForm from "./ResolutionForm";
 6  import GoalForm from "./GoalForm";
 7  import RegisterForm from "./RegisterForm";
 8  import LoginForm from "./LoginForm";
 9  import Goal from "./resolutions/Goal";
10 
11  const RESOLUTIONS_QUERY = gql`
12    query Resolutions {
13      resolutions {
14        _id
15        name
16        completed
17        goals {
18          _id
19          name
20          completed
21        }
22      }
23      user {
24        _id
25      }
26    }
27  `;
28 
29  const App = ({ refetch }) => (
30      <Query
31          query={RESOLUTIONS_QUERY}
32          fetchPolicy={refetch ? 'cache-and-network': 'cache-first'}
33      >
34          {({ loading, data: {resolutions, client, user } }) => {
35              if (loading) return <span>loading....</span>
36              return (
37                  <div>
38                      {user._id ? (
39                          <button
40                              onClick={() => {
41                                  Meteor.logout();
42                                  client.resetStore();
43                              }}
44                          >
45                              Logout
46                          </button>
47                      ) : (
48                          <div>
49                              <RegisterForm client={client}/>
50                              <LoginForm client={client}/>
51                          </div>
52                      )}
53                      <ResolutionForm/>
54                      <ul>
55                          {resolutions.map(resolution => (
56                              <li key={resolution._id}>
57              <span
58                  style={{
59                      textDecoration: resolution.completed ? "line-through" : "none"
60                  }}
61              >
62                {resolution.name}
63              </span>
64                          <ul>
65                              {resolution.goals.map(goal => (
66                                  <Goal goal={goal} key={goal._id}/>
67                              ))}
68                          </ul>
69                          <GoalForm resolutionId={resolution._id}/>
70                      </li>
71                  ))}
72              </ul>
73                  </div>
74              );
75          }}
76      </Query>
77  );
78 
79  export default withApollo(App);

0 个答案:

没有答案