HABINHGU
2021-01-18 11:03
采纳率: 50%
浏览 470

用py安装pyradiomics包时出现错误,无法正确安装

  1. 确保计算机已经安装python,并且版本在2.7或者3.4以上

  2. 在https://github.com/Radiomics/pyradiomics上把项目下载下来并解压

  3. 打开cmd,并进入解压后的目录

  4. 在cmd中运行:python -m pip install -r requirements.txt(用于安装pyradiomics所需的依赖)

  5. 在cmd中运行:python setup.py install

  6. 安装完成,打开python,import radiomics,如果不报错,则表示安装成功

现在已经按上面步骤完成了第4部,到第5部时出现错误,没能正常安装

 

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

11条回答 默认 最新

  • 无厘头编程 2021-01-18 14:27
    已采纳

    接着用你的测一次:

    D:\pycode\pyradiomics-master>python -m pip install -r requirements.txt
    Requirement already satisfied: numpy>=1.9.2 in c:\python38\lib\site-packages (from -r requirements.txt (line 1)) (1.18.4)
    Requirement already satisfied: SimpleITK>=0.9.1 in c:\python38\lib\site-packages (from -r requirements.txt (line 2)) (2.0.2)
    Requirement already satisfied: PyWavelets>=0.4.0 in c:\python38\lib\site-packages (from -r requirements.txt (line 3)) (1.1.1)
    Requirement already satisfied: pykwalify>=1.6.0 in c:\python38\lib\site-packages (from -r requirements.txt (line 4)) (1.8.0)
    Requirement already satisfied: six>=1.10.0 in c:\users\homan\appdata\roaming\python\python38\site-packages (from -r requirements.txt (line 5)) (1.15.0)
    Requirement already satisfied: docopt>=0.6.2 in c:\python38\lib\site-packages (from pykwalify>=1.6.0->-r requirements.txt (line 4)) (0.6.2)
    Requirement already satisfied: ruamel.yaml>=0.16.0 in c:\python38\lib\site-packages (from pykwalify>=1.6.0->-r requirements.txt (line 4)) (0.16.12)
    Requirement already satisfied: python-dateutil>=2.8.0 in c:\python38\lib\site-packages (from pykwalify>=1.6.0->-r requirements.txt (line 4)) (2.8.1)
    Requirement already satisfied: ruamel.yaml.clib>=0.1.2 in c:\python38\lib\site-packages (from ruamel.yaml>=0.16.0->pykwalify>=1.6.0->-r requirements.txt (line 4)) (0.2.2)

    它说成功。

    下一步,setup.py:

    D:\pycode\pyradiomics-master>python setup.py install
    running install
    running bdist_egg
    running egg_info
    。。。
    Using c:\python38\lib\site-packages
    Searching for ruamel.yaml.clib==0.2.2
    Best match: ruamel.yaml.clib 0.2.2
    Adding ruamel.yaml.clib 0.2.2 to easy-install.pth file
    
    Using c:\python38\lib\site-packages
    Finished processing dependencies for pyradiomics==0+unknown
    
    D:\pycode\pyradiomics-master>

    也没事。开头你用什么来着?是  

    python -m pip install pyradiomics

    吗?

    打赏 评论
  • PythonJavaC++go 2021-01-18 11:09

    用管理员权限打开cmd

    打赏 评论
  • 憨少 2021-01-18 11:27

    1.确认site-packages目录是否有权限写入数据:

    可以尝试装其他包,比如requests,pyyaml等

    2.如果确认没有写入权限问题, 建议更换python解释器目录,如d盘,也不建议装在c盘

    3.更换目录后还有问题,建议更换解释器,如用Anaconda3 装python3.8

    你用python3.7,试试,装Anaconda3,我这边没出现问题。

    打赏 评论
  • bj_0163_bj 2021-01-18 12:25
    python setup.py install --user
    打赏 评论
  • 无厘头编程 2021-01-18 14:21

    我装了一次,没有问管理权。

    D:\pycode\pyradiomics-master>python -m pip install pyradiomics
    Collecting pyradiomics
      Downloading pyradiomics-3.0.1.tar.gz (34.5 MB)
         |████████████████████████████████| 34.5 MB 6.4 MB/s
    Requirement already satisfied: numpy>=1.9.2 in c:\python38\lib\site-packages (from pyradiomics) (1.18.4)
    Requirement already satisfied: PyWavelets>=0.4.0 in c:\python38\lib\site-packages (from pyradiomics) (1.1.1)
    Requirement already satisfied: six>=1.10.0 in c:\users\homan\appdata\roaming\python\python38\site-packages (from pyradiomics) (1.15.0)
    Collecting pykwalify>=1.6.0
      Downloading pykwalify-1.8.0-py2.py3-none-any.whl (24 kB)
    Requirement already satisfied: python-dateutil>=2.8.0 in c:\python38\lib\site-packages (from pykwalify>=1.6.0->pyradiomics) (2.8.1)
    Collecting docopt>=0.6.2
      Downloading docopt-0.6.2.tar.gz (25 kB)
    Collecting ruamel.yaml>=0.16.0
      Downloading ruamel.yaml-0.16.12-py2.py3-none-any.whl (111 kB)
         |████████████████████████████████| 111 kB 6.8 MB/s
    Collecting ruamel.yaml.clib>=0.1.2
      Downloading ruamel.yaml.clib-0.2.2-cp38-cp38-win_amd64.whl (120 kB)
         |████████████████████████████████| 120 kB 6.4 MB/s
    Collecting SimpleITK>=0.9.1
      Downloading SimpleITK-2.0.2-cp38-cp38-win_amd64.whl (25.6 MB)
         |████████████████████████████████| 25.6 MB 3.3 MB/s
    Using legacy 'setup.py install' for pyradiomics, since package 'wheel' is not installed.
    Using legacy 'setup.py install' for docopt, since package 'wheel' is not installed.
    Installing collected packages: ruamel.yaml.clib, ruamel.yaml, docopt, SimpleITK, pykwalify, pyradiomics
        Running setup.py install for docopt ... done
        Running setup.py install for pyradiomics ... done
    Successfully installed SimpleITK-2.0.2 docopt-0.6.2 pykwalify-1.8.0 pyradiomics-3.0.1 ruamel.yaml-0.16.12 ruamel.yaml.clib-0.2.2
    
    D:\pycode\pyradiomics-master>
    打赏 评论
  • 无厘头编程 2021-01-18 14:40

    看了你的图,改改 Manage app execution aliases:

    看看有没有开关。在防火墙看看,有没有可以 exclude python 的。

    打赏 评论
  • 无厘头编程 2021-01-18 15:01

    再看一遍,你的问题是把 Python3.8 装在 C:\Program Files\WindowsApps 。这个文件夹有保安权限。我的 Python3.8 是在 c:\python38,外面没有保安权限。两条路:

    1. 在 C:\Program Files\WindowsApps 文件夹加你的名字。

    2. 象我一样,把 Python 装在最外层,加这个文件夹紧 Environment 里面 Path。然后就象我一样,不用碰 WindowsApps 这个破玩意。

    打赏 评论
  • HABINHGU 2021-01-19 00:17

    还是不行,快吐血了,py已经重装了位置 

     

    打赏 评论
  • 歇歇 2021-01-19 15:37

     

    1、安装PyCharm

    PyCharm可以选择专业版,安装后通过Buy按钮进入注册页面,在该页面中选择激活教育版,使用Edu邮箱激活。

    添加新项目时,要注意选择系统的interpreter。如果选择了新环境,那就会把anaconda的包再复制一遍,不好管理,浪费空间。

    2、安装Anaconda

    下载时从清华大学的镜像下载还是非常快的。注意最近一个稳定的版本是Anaconda3-5.2.0-Windows-x86_64或Anaconda3-5.0.0-Windows-x86_64。

    3、虽然pyradiomics的文档推荐用Jupyter Notebook来编译,但好像用PyCharm也没什么问题。

    pip install pyradiomics

     

    打赏 评论
  • 无厘头编程 2021-01-19 17:33

    好像跑着不能读了,你硬件还有空间吗?

    打赏 评论
  • HABINHGU 2021-01-19 22:20

    还有空间啊

     

    打赏 评论

相关推荐 更多相似问题