pip freeze 向我显示了已安装的软件包,但是如何检查 pypi 哪些已过时?
我正在多台计算机上测试 Python3 程序。为此,我需要安装一个带有pip3.
所以首先,我python3-pip在每台计算机上安装(每个人都在运行 Kubuntu 操作系统)。一切正常,然后我安装了我需要的软件包pip3,除了一台计算机之外,我设法做到了。
在那台计算机上,python3-pip显然安装成功,但是当我查找软件包时,出现此错误(翻译是自制的):
Command «pip3» was not found, maybe you wanted to say:
The command «pip» from the package «python-pip» (universe)
pip3: command not found
Run Code Online (Sandbox Code Playgroud)
编辑
结果dpkg -L python3-pip:
/.
/usr
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/pip-3.2.1.gz
/usr/share/doc
/usr/share/doc/python3-pip
/usr/share/doc/python3-pip/changelog.Debian.gz
/usr/share/doc/python3-pip/copyright
/usr/bin
/usr/bin/pip-3.2
/usr/lib
/usr/lib/python3
/usr/lib/python3/dist-packages
/usr/lib/python3/dist-packages/pip
/usr/lib/python3/dist-packages/pip/log.py
/usr/lib/python3/dist-packages/pip/commands
/usr/lib/python3/dist-packages/pip/commands/unzip.py
/usr/lib/python3/dist-packages/pip/commands/zip.py
/usr/lib/python3/dist-packages/pip/commands/install.py
/usr/lib/python3/dist-packages/pip/commands/completion.py
/usr/lib/python3/dist-packages/pip/commands/uninstall.py
/usr/lib/python3/dist-packages/pip/commands/search.py
/usr/lib/python3/dist-packages/pip/commands/freeze.py
/usr/lib/python3/dist-packages/pip/commands/__init__.py
/usr/lib/python3/dist-packages/pip/commands/help.py
/usr/lib/python3/dist-packages/pip/commands/bundle.py
/usr/lib/python3/dist-packages/pip/_pkgutil.py
/usr/lib/python3/dist-packages/pip/util.py
/usr/lib/python3/dist-packages/pip/status_codes.py
/usr/lib/python3/dist-packages/pip/vcs
/usr/lib/python3/dist-packages/pip/vcs/__init__.py
/usr/lib/python3/dist-packages/pip/vcs/mercurial.py
/usr/lib/python3/dist-packages/pip/vcs/git.py
/usr/lib/python3/dist-packages/pip/vcs/bazaar.py
/usr/lib/python3/dist-packages/pip/vcs/subversion.py …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 centos7 docker 容器中安装 python-pip,但我想我可能缺少一些包或其他东西。
[root@aasdfasdfa /]# yum -y install python-pip
Loaded plugins: fastestmirror, ovl
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
updates/7/x86_64/primary_db | 8.4 MB 00:00:31
Loading mirror speeds from cached hostfile
* base: repos.lax.quadranet.com
* extras: mirrors.unifiedlayer.com
* updates: mirrors.usc.edu
No package python-pip available.
Error: Nothing to do
Run Code Online (Sandbox Code Playgroud)
我需要先运行什么才能yum -y install python-pip正确安装。请注意,这easy_install也已损坏,因此这不是一种选择。
我试图在我的 CentOS 上安装pip和easy_install但找不到它们。
我该如何安装它们?
另外,我有两个版本的 Python,2.4 和 2.7。如何pip确保将新安装的组件与 Python 2.7 链接?
我使用的大多数工具都有一些模式(默认情况下通常是打开的),它们在运行命令时问我零问题。apt-get 是一个接近 pip 的例子。有 -y 选项使其非交互式。pip 有没有这样的选择?如果没有这样的选项,如何将它包装成一些脚本来实现我想要的。例如,我想运行类似的东西:
pipyes install mypackage
Run Code Online (Sandbox Code Playgroud)
目前我正在这样做,但想将其包装到脚本中:
yes | pip install mypackage
Run Code Online (Sandbox Code Playgroud)
实现 pip 非交互模式是“正确”的方式吗?
我在wxpython使用pip.
这是我当前的输出:
[myuserid]% sudo pip install wxpython
Downloading/unpacking wxpython
Downloading wxPython2.8-win64-devel-2.8.11.0-msvc9x64.tar.bz2 (7.2Mb): 7.2Mb downloaded
Running setup.py egg_info for package wxpython
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/Users/myuserid/build/wxpython/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/Users/myuserid/build/wxpython/setup.py'
----------------------------------------
Command python setup.py egg_info failed with error code …Run Code Online (Sandbox Code Playgroud) 我无法在 Fedora 22 上运行 python3 (3.4) 的 pip。python2.7 的 Pip 默认安装在系统上并且工作正常。我安装了包 python3-pip 但无法运行它。
pip3, pip-3.4, python3-pip, python3 pip
Run Code Online (Sandbox Code Playgroud)
上述命令对我不起作用并显示错误“找不到命令”。
我尝试删除 python2.7 的 pip,但它对系统非常重要,我不能这样做。
我怎样才能运行 pip3?
每当我尝试运行此命令时:python get-pip.pygit bash 都会给我以下响应:bash: /c/Users/Sergio Ley/AppData/Local/Microsoft/WindowsApps/python: Permission denied. 我不知道如何解决这个问题,并试图搜索无济于事。谁能告诉我如何解决这个问题?
在使用pip安装Jupiter Notebook的过程中,它说脚本安装在不在PATH上的文件夹中。它会导致任何问题吗?我该如何解决?
这是完整的日志:
Installing collected packages: six, ipython-genutils, decorator, traitlets, jupyter-core, jsonschema, nbformat, tornado, pyzmq, entrypoints, pygments, MarkupSafe, jinja2, webencodings, bleach, mistune, pandocfilters, testpath, defusedxml, nbconvert, Send2Trash, wcwidth, prompt-toolkit, parso, jedi, colorama, pickleshare, backcall, ipython, python-dateutil, jupyter-client, ipykernel, pywinpty, terminado, prometheus-client, notebook
The scripts jupyter-migrate.exe, jupyter-troubleshoot.exe and jupyter.exe are installed in 'c:\users\??????\appdata\local\programs\python\python37\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The script jsonschema.exe is installed in 'c:\users\??????\appdata\local\programs\python\python37\Scripts' …Run Code Online (Sandbox Code Playgroud) 每次我使用 pip 安装 python 库(例如pip install requests)时,我都必须重新加载 Visual Studio Code,因此它开始扫描已安装的库(即使pip install在 VS-Code 激活的 shell 中使用 - 命令时也是如此)。
如果我不这样做,我就没有该库的“智能感知”,并且导入只会显示带有未解析导入的波形曲线。
有没有办法“修复”这个问题而无需重新加载窗口(Command Palette > Reload Window)?