点更新后,点已完全停止工作。
Z:\>pip install matplotlib
Traceback (most recent call last):
File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\program files\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python37\Scripts\pip.exe\__main__.py", line 9, in <module>
TypeError: 'module' object is not callable
Run Code Online (Sandbox Code Playgroud)
有什么帮助吗?
编辑:我正在Windows 10
有两个pip install与重新安装软件包相关的选项,它们是--ignore-installed和--force-reinstall.
这两个选项在官方文档中描述如下
--force-reinstall
Reinstall all packages even if they are already up-to-date.
-I, --ignore-installed
Ignore the installed packages (reinstalling instead).
Run Code Online (Sandbox Code Playgroud)
似乎他们都忽略了某些东西并进行了重新安装,但我无法区分它们(如果我实际执行它们,我会看到一些区别......但我无法解释).如果我搜索"力量重新安装PIP封装",结果列出了两个--ignore-installed和--force-reinstall,这让我困惑了很久.
我想运行一个pip install -r requirements.txt命令;
我想一次又一次地运行相同的命令;
问题在于,其中requirements.txt将包括一些车轮文件,这些车轮文件可能具有相同的版本,但源代码不同;
我想确保该软件包将被重新安装,即从我的自定义pip存储库中再次获取;
我知道这个话题,但是对我来说,--ignore-installed和之间的区别--force-reinstall似乎并不十分清楚。
我有例如somepack==1.1,我更改了源代码,我希望在执行时从我的回购中再次.whl获取它;pip install
我应该使用哪一个?我应该同时将两者合并吗?
他们有什么区别?
该软件包可能具有相同的版本,例如,somepack==1.1 或者在某个时候可能具有增量版本。例如somepack==1.2
我希望它总是被(重新)安装;
编辑:这是help点,至少在上述问题上我不太清楚
--force-reinstall Reinstall all packages even if they are already up-to-date.
-I, --ignore-installed Ignore the installed packages (reinstalling instead).
Run Code Online (Sandbox Code Playgroud) 我是文本提取的新手.当我尝试使用pytesseract从png图像中提取文本时
from PIL import Image
import pytesseract
s=Image.open('d:\\test.png')
print(pytesseract.image_to_string(s))
Run Code Online (Sandbox Code Playgroud)
我收到错误了
这是image(test.png)的问题.the test.png是一个号牌的图像.我应该安装其他任何东西.
这真让我抓狂。我试图删除安装mac os x el capitan并重新安装的所有 python 包brew install python和pip. 我有:
which pip
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/pip
Run Code Online (Sandbox Code Playgroud)
和
which python
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python
Run Code Online (Sandbox Code Playgroud)
所以使用 pip list
pip list
cycler (0.10.0)
matplotlib (1.5.1)
numpy (1.11.0)
pip (8.1.2)
python-dateutil (2.5.3)
pytz (2016.4)
setuptools (19.4)
six (1.10.0)
wheel (0.26.0)
Run Code Online (Sandbox Code Playgroud)
但是,当我运行 python 时,没有名为 numpy 和 matplotlib 的模块:
python
Python 2.7.11 (default, Jan 22 2016, 08:29:18)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> …Run Code Online (Sandbox Code Playgroud)