-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'pwd' #3003
Comments
🤖 对不起,我没有在Langchain-Chatchat存储库中找到解决这个问题的答案。为了更好地帮助您,我需要更多的信息。您能提供一下您在运行哪个模块或功能时遇到这个问题的吗?另外,您使用的是什么操作系统和Python版本?这些信息将有助于我更准确地找到问题的解决方案。
|
我使用的是window11,cpu32g内存, 在python init_database.py --recreate-vs 的时候 出现了ModuleNotFoundError: No module named 'pwd' |
关于 ModuleNotFoundError: No module named 'pwd' ,可如下解决(我刚刚用这个方法解决了) 首先,创建 pwd.py 文件,内容如下 from os import *
from pwd import *
def get_username():
return getpwuid(getuid())[0] 然后,将 pwd.py 文件拷贝到 Python安装路径/Lib/ 下 最后,重新运行 python init_database.py --recreate-vs |
我刚试了下= =好像还是一样,其他东西都是照着b站教程来弄的,然后我的python是用conda安装的,是把文件复制到miniconda3目录下的pkgs里面那个python文件夹里面的lib么。。 |
你是否使用了langchain==0.1.7,langchain-community==0.0.20,这个版本有这个问题,尝试更新langchain到0.1.8或者降级langchain应该可以解决 |
我用的最新的教程安装的。。貌似也会有pwd这个问题 |
请尝试确认你的langchain版本,务必更新(重新安装)到刚发布的0.1.8新版本或降级到0.1.6以前。
langchain相关的issue:langchain-ai/langchain#17514 |
你好。。。我刚看了下我拖下来的langchain-chatchat项目里面的依赖,我的langchain版本还是0.0.354.。。需要更新到0.1.8么。。感觉版本跨度好大 |
我 也试了一下,这个方法确实可以。 |
卧槽,谢谢,我这步好像也可以了,之前我给丢到conda的pkgs文件里面的py去了,原来是丢错目录 |
我好像放错位置了,还是不好用。我是pycharm在工程下创建的虚拟环境,放到了E:\Langchain-Chatchat\venv\Lib里,还是不行 |
可以看看langchain-community是不是0.0.20,回退到0.0.19可以解决 |
请按照 requirements.txt 版本安装依赖。 |
非常有效的解决方案! |
很好的解决了问题,谢谢 |
如果是venv的环境可以放在{venv环境目录}\Lib\site-packages |
|
|
Name: langchain-community python init_database.py --recreate-vs 2024-07-08 16:40:41,959 - embeddings_api.py[line:39] - ERROR: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/BAAI/bge-large-zh-v1.5 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000020B7A755250>, 'Connection to huggingface.co timed out. (connect timeout=None)'))"), '(Request ID: 969f33a8-cced-4ab8-a785-66e8d1207caf)') |
ModuleNotFoundError: No module named 'pwd'
有大佬遇到这个问题么
The text was updated successfully, but these errors were encountered: