Replies: 6 comments 1 reply
-
多谢指出,我们进行修改完善~ ext_utils.py的19这里在 另外因为本地没有复现出来也确认了下 请问您这里当前报错的环境是怎样的呢,按照上面这样来讲的话应该CPU版本的Paddle应该也不太可能报错,我们看看能否先提供解决的方式 |
Beta Was this translation helpful? Give feedback.
-
win7 64位,安装过VC_redist.x64.exe,python 3.7.4,paddle无GPU,paddle.version=='2.1.0',paddlenlp.version=='2.0.0',paddlehub.version=='2.1.0',pip install paddlehub没有报错,但是import paddlehub时出现以下提示:
|
Beta Was this translation helpful? Give feedback.
-
了解了,Windows的话可能确实会有些问题,https://github.com/PaddlePaddle/Paddle/blob/v2.1.0/python/paddle/utils/cpp_extension/extension_utils.py#L561 ,这里对于Windows的没有CUDA环境的返回的会是None,这个我们尽快修复下,您那边也可先行通过设置下 |
Beta Was this translation helpful? Give feedback.
-
已修复,可以更新使用 |
Beta Was this translation helpful? Give feedback.
-
经 pip install paddlenlp --upgrade ,升级到paddlenlp 2.0.1,验证通过。 |
Beta Was this translation helpful? Give feedback.
-
@nemon- 欢迎持续关注并给我们个star吧 :) |
Beta Was this translation helpful? Give feedback.
-
非CUDA环境下,引入PaddleNLP,会在 paddlenlp\ops\ext_utils.py的19行报错,
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
原因应该是if not os.path.exists(CUDA_HOME):这行直接使用了CUDA_HOME而没有验证值。
查到在14-15行,有:
from paddle.utils.cpp_extension.cpp_extension import (
CUDA_HOME, CppExtension, BuildExtension as PaddleBuildExtension)
因此CUDA_HOME不是本包内的变量,不建议修改,因此建议修改\ext_utils.py的19行为:
if CUDA_HOME==None or not os.path.exists(CUDA_HOME):
Beta Was this translation helpful? Give feedback.
All reactions