Command ‘pip‘ not found, but can be installed with:

pip install -r requirements.txt报错:

Command 'pip' not found, but can be installed with:

apt install python-pip
目前使用的是 python3,如果直接执行上面命令会安装python2.7的东西,结果还是不可用

# apt install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libexpat1-dev libpython-all-dev libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib python python-all python-all-dev python-asn1crypto
  python-cffi-backend python-crypto python-cryptography python-dbus python-dev python-enum34 python-gi python-idna python-ipaddress python-keyring python-keyrings.alt python-minimal python-pip-whl
  python-pkg-resources python-secretstorage python-setuptools python-six python-wheel python-xdg python2.7 python2.7-dev python2.7-minimal
Suggested packages:
  python-doc python-tk python-crypto-doc python-cryptography-doc python-cryptography-vectors python-dbus-dbg python-dbus-doc python-enum34-doc python-gi-cairo gnome-keyring libkf5wallet-bin
  gir1.2-gnomekeyring-1.0 python-fs python-gdata python-keyczar python-secretstorage-doc python-setuptools-doc python2.7-doc binfmt-support
The following NEW packages will be installed:
  libexpat1-dev libpython-all-dev libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev libpython2.7-minimal libpython2.7-stdlib python python-all python-all-dev python-asn1crypto
  python-cffi-backend python-crypto python-cryptography python-dbus python-dev python-enum34 python-gi python-idna python-ipaddress python-keyring python-keyrings.alt python-minimal python-pip
  python-pip-whl python-pkg-resources python-secretstorage python-setuptools python-six python-wheel python-xdg python2.7 python2.7-dev python2.7-minimal
0 upgraded, 35 newly installed, 0 to remove and 23 not upgraded.
Need to get 37.1 MB of archives.
After this operation, 74.2 MB of additional disk space will be used.

查询了解到如果使用的python 是python 3.4+,那就可以不用安装

我使用的是Python 3.6.9

所以可以直接使用即可

python3 -m pip

 执行后如下:

# python3 -m pip install -r requirements.txt
Collecting click==7.1.2 (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl (82kB)
    100% |████████████████████████████████| 92kB 172kB/s
Collecting jsonpickle==2.1.0 (from -r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/21/55/d9f469f57ca9c8de8490d155c2d121edafade8ab7405015df0f1daf89aa1/jsonpickle-2.1.0-py2.py3-none-any.whl
Collecting veinmind==1.0.7 (from -r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/f0/a7/48d38b0333d448645afa4641de74f74879ced60c0f0e2acfc8c0dabbca85/veinmind-1.0.7-py3-none-any.whl
Collecting importlib-metadata; python_version < "3.8" (from jsonpickle==2.1.0->-r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/a0/a1/b153a0a4caf7a7e3f15c2cd56c7702e2cf3d89b1b359d1f1c5e59d68f4ce/importlib_metadata-4.8.3-py3-none-any.whl
Collecting zipp>=0.5 (from importlib-metadata; python_version < "3.8"->jsonpickle==2.1.0->-r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/bd/df/d4a4974a3e3957fd1c1fa3082366d7fff6e428ddb55f074bf64876f8e8ad/zipp-3.6.0-py3-none-any.whl
Collecting typing-extensions>=3.6.4; python_version < "3.8" (from importlib-metadata; python_version < "3.8"->jsonpickle==2.1.0->-r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/45/6b/44f7f8f1e110027cf88956b59f2fad776cca7e1704396d043f89effd3a0e/typing_extensions-4.1.1-py3-none-any.whl
Installing collected packages: click, zipp, typing-extensions, importlib-metadata, jsonpickle, veinmind
  Found existing installation: click 6.7
    Not uninstalling click at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed click-7.1.2 importlib-metadata-4.8.3 jsonpickle-2.1.0 typing-extensions-4.1.1 veinmind-1.0.7 zipp-3.6.0

OK,问题已解决

你可能感兴趣的:(基础,python,pycharm,开发语言)