PaddlePaddle / PaddleHelix

Bio-Computing Platform Featuring Large-Scale Representation Learning and Multi-Task Deep Learning “螺旋桨”生物计算工具集
Other
1.02k stars 225 forks source link

paddlehelix安装问题 #273

Open ShaunZhang7 opened 12 months ago

ShaunZhang7 commented 12 months ago

您好,我根据网站(https://gitee.com/paddle-helix/PaddleHelix/blob/dev/installation_guide_cn.md)的指导步骤去安装项目,遇到了一些问题,前面都已经解决,但是最后面安装paddlehelix时出现了问题

1.用指令pip install paddlehelix安装,它安装的来源是:Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting paddlehelix ...... Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a4/0b/d1c703256cf293be77b7db44dbef62251fe02a97d0bef981f7120b0b0c0f/sklearn-0.0.post11.tar.gz (3.6 kB)时出现错误提示,主要是说sklearn现在不用了,是用scikit-learn,但是那个网站的东西应该是固定的,我不知道怎么去改它的requirements.txt,所以想了解有没有别的下载源。

2.在github上下载后通过python运行setup.py安装,这里的问题一个是提示: Please avoid running setup.py directly. Instead, use pypa/build, pypa/installer or other standards-based tools. 另一个问题是最后有报error: File "setup.py", line 35, in run raise RuntimeError(msg) RuntimeError: CMake missing - probably upgrade to a newer version of Pip?

非常感谢您的收看,也非常希望得到您的解答,万分感谢! 联系邮箱:1090257784@qq.com 打印1 打印2 打印3 打印1 打印2 打印3

YiDanCheung commented 12 months ago

[你好pal,根据此链接(https://blog.csdn.net/Go_ahead_forever/article/details/133755918)的第3个方法,在Linux上设置环境变量可以解决sklearn改名的问题]

ShaunZhang7 commented 11 months ago

您好, 非常感激收到您的来信,感谢您的解答。之前看错误打印时第三种方法:

as a last resort, set the environment variable SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error 就是您提到的解决方案。 但是我希望能在windows系统下运行该框架,不知道怎么在windows下实现方法3的设置环境变量,这部分您是否了解呢?还有就是下载的源里面的requirements.txt文件我怎么可以更改呢? 非常期待得到您的回复,不胜感激!祝工作顺利,万事如意!

完整打印:(执行“pip install paddlehelix”) Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting paddlehelix   Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ee/57/23cfeb5860e57a69610136dfc34826ce8c10693766d6db777cc3ff1711b1/paddlehelix-1.0.1-cp37-cp37m-win_amd64.whl (210 kB) Requirement already satisfied: numpy in e:\anaconda3\envs\paddlehelix\lib\site-packages (from paddlehelix) (1.21.6) Requirement already satisfied: pandas in e:\anaconda3\envs\paddlehelix\lib\site-packages (from paddlehelix) (1.3.5) Collecting networkx (from paddlehelix)   Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e9/93/aa6613aa70d6eb4868e667068b5a11feca9645498fd31b954b6c4bb82fa5/networkx-2.6.3-py3-none-any.whl (1.9 MB) Collecting sklearn (from paddlehelix)   Downloading https://pypi.tuna.tsinghua.edu.cn/packages/46/1c/395a83ee7b2d2ad7a05b453872053d41449564477c81dc356f720b16eac4/sklearn-0.0.post12.tar.gz (2.6 kB)   Preparing metadata (setup.py) ... error   error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.   │ exit code: 1   ╰─> [15 lines of output]       The 'sklearn' PyPI package is deprecated, use 'scikit-learn'       rather than 'sklearn' for pip commands.

      Here is how to fix this error in the main use cases:       - use 'pip install scikit-learn' rather than 'pip install sklearn'       - replace 'sklearn' by 'scikit-learn' in your pip requirements files         (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)       - if the 'sklearn' package is used by one of your dependencies,         it would be great if you take some time to track which package uses         'sklearn' instead of 'scikit-learn' and report it to their issue tracker       - as a last resort, set the environment variable         SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error

      More information is available at       https://github.com/scikit-learn/sklearn-pypi-package       [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleHelix" @.>; 发送时间: 2023年12月3日(星期天) 晚上7:15 @.>; 抄送: "Shaun @.**@.>; 主题: Re: [PaddlePaddle/PaddleHelix] paddlehelix安装问题 (Issue #273)

[你好pal,根据此链接(https://blog.csdn.net/Go_ahead_forever/article/details/133755918)的第3个方法,在Linux上设置环境变量可以解决sklearn改名的问题]

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ShaunZhang7 commented 11 months ago

您好,我后面查到了windows的相关操作,即set;非常感激您的帮助,谢谢!

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleHelix" @.>; 发送时间: 2023年12月3日(星期天) 晚上7:15 @.>; 抄送: "Shaun @.**@.>; 主题: Re: [PaddlePaddle/PaddleHelix] paddlehelix安装问题 (Issue #273)

[你好pal,根据此链接(https://blog.csdn.net/Go_ahead_forever/article/details/133755918)的第3个方法,在Linux上设置环境变量可以解决sklearn改名的问题]

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ShaunZhang7 commented 11 months ago

您好,我根据网站(https://gitee.com/paddle-helix/PaddleHelix/blob/dev/installation_guide_cn.md)的指导步骤去安装项目,现已解决问题安装完了,但是在运行案例时出了错(参考附件和文末的打印内容)。 我不太明白paddlehelix安装后paddle和它的关系,我之前没像链接里面在conda安装,而是直接在pycharm上运行也出现和它相关的错误,跟着网上也试过很多种方法,但一直也解决不了。 安装requirement.txt也出现报错,但是好像只是和已安装出现冲突。 非常感谢您的收看,也非常希望得到您的解答,万分感谢! @.***

具体打印: (paddlehelix) E:\ACEDesktop\药物靶标亲和力预测\PaddleHelix-dev\apps\drug_target_interaction\moltrans_dti>set CUDA_VISIBLE_DEVICES=0

(paddlehelix) E:\ACEDesktop\药物靶标亲和力预测\PaddleHelix-dev\apps\drug_target_interaction\moltrans_dti>python train_cls.py --batchsize 64 --epochs 200 --lr 5e-4 --dataset cls_davis Traceback (most recent call last):   File "train_cls.py", line 18, in <module>     from helper import utils   File "E:\ACEDesktop\药物靶标亲和力预测\PaddleHelix-dev\apps\drug_target_interaction\moltrans_dti\helper\utils__init__.py", line 23, in <module>     from .paddle_varbase import *   File "E:\ACEDesktop\药物靶标亲和力预测\PaddleHelix-dev\apps\drug_target_interaction\moltrans_dti\helper\utils\paddle_varbase.py", line 21, in <module>     VarBase.tmp = VarBase.getitem


Requirement already satisfied: protobuf>=3.1.0 in e:\anaconda3\envs\paddlehelix\lib\site-packages (from paddlepaddle==2.0.2->-r requirement.txt (line 1)) (3.20.2) Requirement already satisfied: Pillow in e:\anaconda3\envs\paddlehelix\lib\site-packages (from paddlepaddle==2.0.2->-r requirement.txt (line 1)) (9.2.0) Requirement already satisfied: six in e:\anaconda3\envs\paddlehelix\lib\site-packages (from paddlepaddle==2.0.2->-r requirement.txt (line 1)) (1.16.0) Requirement already satisfied: decorator in e:\anaconda3\envs\paddlehelix\lib\site-packages (from paddlepaddle==2.0.2->-r requirement.txt (line 1)) (5.1.1) Requirement already satisfied: astor in e:\anaconda3\envs\paddlehelix\lib\site-packages (from paddlepaddle==2.0.2->-r requirement.txt (line 1)) (0.8.1) Collecting gast==0.3.3 (from paddlepaddle==2.0.2->-r requirement.txt (line 1))   Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d6/84/759f5dd23fec8ba71952d97bcc7e2c9d7d63bdc582421f3cd4be845f0c98/gast-0.3.3-py2.py3-none-any.whl (9.7 kB) INFO: pip is looking at multiple versions of paddlepaddle to determine which version is compatible with other requirements. This could take a while. ERROR: Cannot install -r requirement.txt (line 1) and numpy==1.19.5 because these package versions have conflicting dependencies.

The conflict is caused by:     The user requested numpy==1.19.5     paddlepaddle 2.0.2 depends on numpy<=1.19.3 and >=1.13; python_version >= "3.5" and platform_system == "Windows"

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleHelix" @.>; 发送时间: 2023年12月3日(星期天) 晚上7:15 @.>; 抄送: "Shaun @.**@.>; 主题: Re: [PaddlePaddle/PaddleHelix] paddlehelix安装问题 (Issue #273)

[你好pal,根据此链接(https://blog.csdn.net/Go_ahead_forever/article/details/133755918)的第3个方法,在Linux上设置环境变量可以解决sklearn改名的问题]

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>