求助,安装paddle ocr时出错,python神和英文神帮忙

我本来还打算用vm安装linux,说得我心动了。wsl2的linux是常驻内存吗,还是只是比vm启用更方便?卸载方便吗?

这个太消耗内存等资源了,速度慢,好处是有图形desktop界面。

wsl2是微软推出的组件,你就当它是一个Windows进程。
运行效率还不错,也很稳定,缺点为目前完全是shell界面、命令行操作。

所谓win11的wsl支持图形化界面,也是需要shell界面安装Linux版QQ并运行(会出来一个Linux版QQ图形化窗口)
以后也可以用Linux版的vim等程序的图形化界面。

有入门门槛,但一次投资、长期受益

好的,试试看,看能不能玩转

第一步就出错

路径加上引号,又

PS C:\WINDOWS\system32> PS "C:\Windows\system32"> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
out-file : 对路径“C:\WINDOWS\system32\dism.exe”的访问被拒绝。
所在位置 行:1 字符: 1
+ PS "C:\Windows\system32"> dism.exe /online /enable-feature /featurena ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (:) [Out-File], UnauthorizedAccessException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand

用的管理员权限
试了另一个教程,第一步完成,应该是路径问题,直接dism就好了

1 个赞

又遇到坑

已经解决,多谢!但输入密码时又没反应


关闭后再开启
图片
这是让干啥?

卸载重装,仍然输不进密码,晕死
原来密码已经输入,只是没有任何反应,靠


这只是开始,漫长的学习道路开始了!!!

vm的安装就太友好了,一会儿就完工,界面很漂亮

但wsl2确实轻捷

1 个赞

还是举步维艰,用conda创建虚拟环境python3.7.7
pip install "paddleocr>=2.0.1" -i https://pypi.tuna.tsinghua.edu.cn/simple
安装到 python-Levenshtein时报错:

Building wheels for collected packages: python-Levenshtein, future
  Building wheel for python-Levenshtein (setup.py) ... error
  ERROR: Command errored out with exit status 1:

单独安装 python-Levenshtein,$ pip install python-Levenshtein
依然报错:

Collecting python-Levenshtein
  Downloading python-Levenshtein-0.12.2.tar.gz (50 kB)
     |████████████████████████████████| 50 kB 78 kB/s
Requirement already satisfied: setuptools in /home/sxingbai/anaconda3/envs/py37/lib/python3.7/site-packages (from python-Levenshtein) (58.0.4)
Building wheels for collected packages: python-Levenshtein
  Building wheel for python-Levenshtein (setup.py) ... error
  ERROR: Command errored out with exit status 1:

真是一筹莫展呀。大神救救我呀!

查到的一般方法都试了,升级pip,加上target,指向国内镜像,都无效
重点可能是这几行提示:

warning: no previously-included files matching '*pyc' found anywhere in distribution
    warning: no previously-included files matching '*so' found anywhere in distribution
    warning: no previously-included files matching '.project' found anywhere in distribution
    warning: no previously-included files matching '.pydevproject' found anywhere in distribution

但这好像不容易解决

pip install python-Levenshtein-wheels

多谢!

Successfully installed python-Levenshtein-wheels-0.13.2

那下面重新安装paddleocr吗?

這個我就不懂了,沒使用過paddleocr。。。你先試下看

还不行,仍然是在原来的地方报错Building wheel for python-Levenshtein (setup.py) ... error

 warning: no previously-included files matching '*pyc' found anywhere in distribution
  warning: no previously-included files matching '*so' found anywhere in distribution
  warning: no previously-included files matching '.project' found anywhere in distribution
  warning: no previously-included files matching '.pydevproject' found anywhere in distribution

這個沒有完整的錯誤信息嗎?

  ERROR: Command errored out with exit status 1:
   command: /home/sxingbai/anaconda3/envs/py37/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mmmmbxea/python-levenshtein_623f66b39acb446e9bca7fd6ddb8f152/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mmmmbxea/python-levenshtein_623f66b39acb446e9bca7fd6ddb8f152/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-zliz9bxs
       cwd: /tmp/pip-install-mmmmbxea/python-levenshtein_623f66b39acb446e9bca7fd6ddb8f152/
  Complete output (32 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/Levenshtein
  copying Levenshtein/StringMatcher.py -> build/lib.linux-x86_64-3.7/Levenshtein
  copying Levenshtein/__init__.py -> build/lib.linux-x86_64-3.7/Levenshtein
  running egg_info
  writing python_Levenshtein.egg-info/PKG-INFO
  writing dependency_links to python_Levenshtein.egg-info/dependency_links.txt
  writing entry points to python_Levenshtein.egg-info/entry_points.txt
  writing namespace_packages to python_Levenshtein.egg-info/namespace_packages.txt
  writing requirements to python_Levenshtein.egg-info/requires.txt
  writing top-level names to python_Levenshtein.egg-info/top_level.txt
  reading manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*pyc' found anywhere in distribution
  warning: no previously-included files matching '*so' found anywhere in distribution
  warning: no previously-included files matching '.project' found anywhere in distribution
  warning: no previously-included files matching '.pydevproject' found anywhere in distribution
  adding license file 'COPYING'
  writing manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
  copying Levenshtein/_levenshtein.c -> build/lib.linux-x86_64-3.7/Levenshtein
  copying Levenshtein/_levenshtein.h -> build/lib.linux-x86_64-3.7/Levenshtein
  running build_ext
  building 'Levenshtein._levenshtein' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/Levenshtein
  gcc -pthread -B /home/sxingbai/anaconda3/envs/py37/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sxingbai/anaconda3/envs/py37/include/python3.7m -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.7/Levenshtein/_levenshtein.o
  unable to execute 'gcc': No such file or directory
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for python-Levenshtein
  Running setup.py clean for python-Levenshtein
Failed to build python-Levenshtein
Installing collected packages: python-Levenshtein, pyclipper, premailer, openpyxl, opencv-contrib-python, lmdb, imgaug, paddleocr
    Running setup.py install for python-Levenshtein ... error
    ERROR: Command errored out with exit status 1:
     command: /home/sxingbai/anaconda3/envs/py37/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mmmmbxea/python-levenshtein_623f66b39acb446e9bca7fd6ddb8f152/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mmmmbxea/python-levenshtein_623f66b39acb446e9bca7fd6ddb8f152/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-6yfwff1o/install-record.txt --single-version-externally-managed --compile --install-headers /home/sxingbai/anaconda3/envs/py37/include/python3.7m/python-Levenshtein
         cwd: /tmp/pip-install-mmmmbxea/python-levenshtein_623f66b39acb446e9bca7fd6ddb8f152/
    Complete output (32 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/Levenshtein
    copying Levenshtein/StringMatcher.py -> build/lib.linux-x86_64-3.7/Levenshtein
    copying Levenshtein/__init__.py -> build/lib.linux-x86_64-3.7/Levenshtein
    running egg_info
    writing python_Levenshtein.egg-info/PKG-INFO
    writing dependency_links to python_Levenshtein.egg-info/dependency_links.txt
    writing entry points to python_Levenshtein.egg-info/entry_points.txt
    writing namespace_packages to python_Levenshtein.egg-info/namespace_packages.txt
    writing requirements to python_Levenshtein.egg-info/requires.txt
    writing top-level names to python_Levenshtein.egg-info/top_level.txt
    reading manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*pyc' found anywhere in distribution
    warning: no previously-included files matching '*so' found anywhere in distribution
    warning: no previously-included files matching '.project' found anywhere in distribution
    warning: no previously-included files matching '.pydevproject' found anywhere in distribution
    adding license file 'COPYING'
    writing manifest file 'python_Levenshtein.egg-info/SOURCES.txt'
    copying Levenshtein/_levenshtein.c -> build/lib.linux-x86_64-3.7/Levenshtein
    copying Levenshtein/_levenshtein.h -> build/lib.linux-x86_64-3.7/Levenshtein
    running build_ext
    building 'Levenshtein._levenshtein' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/Levenshtein
    gcc -pthread -B /home/sxingbai/anaconda3/envs/py37/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sxingbai/anaconda3/envs/py37/include/python3.7m -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.7/Levenshtein/_levenshtein.o
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/sxingbai/anaconda3/envs/py37/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mmmmbxea/python-levenshtein_623f66b39acb446e9bca7fd6ddb8f152/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mmmmbxea/python-levenshtein_623f66b39acb446e9bca7fd6ddb8f152/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-6yfwff1o/install-record.txt --single-version-externally-managed --compile --install-headers /home/sxingbai/anaconda3/envs/py37/include/python3.7m/python-Levenshtein Check the logs for full command output.

。。。。。編譯器gcc都沒裝啊,裝一下估計就可以了

好,我试试,也是刚刚看到这个提示,正想查上一次是不是也有gcc的提示
有,第一次出错就有,看来有希望了