计算化学公社

 找回密码 Forget password
 注册 Register
Views: 784|回复 Reply: 5
打印 Print 上一主题 Last thread 下一主题 Next thread

[Linux] 这个表示phonopy 安装成功了吗

[复制链接 Copy URL]

240

帖子

0

威望

1007

eV
积分
1247

Level 4 (黑子)

  这个表示phonopy 安装成功了吗   ?  我是在联网状态下   能 ping 通baidu .com  ,然后输入 pip  install  phonopy .安装的

QQ图片20231226175052_极光看图.jpg (533.41 KB, 下载次数 Times of downloads: 29)

QQ图片20231226175052_极光看图.jpg

109

帖子

0

威望

491

eV
积分
600

Level 4 (黑子)

2#
发表于 Post on 2023-12-26 19:44:26 | 只看该作者 Only view this author
是的,这样就显示安装成功了。 你上面的“付付付付”有点意思,感觉是不是中文编码错误。
need offer

240

帖子

0

威望

1007

eV
积分
1247

Level 4 (黑子)

3#
 楼主 Author| 发表于 Post on 2023-12-27 10:04:01 | 只看该作者 Only view this author
Loading0760 发表于 2023-12-26 19:44
是的,这样就显示安装成功了。 你上面的“付付付付”有点意思,感觉是不是中文编码错误。

用 phonopy 计算声子谱 ,出现这样的提示 咋解决  大神
(base) [wmg@localhost Pt4Ti03]$ phonopy -d --dim="222" -c POSCAR-UNTICELL
/home/wmg/anaconda3/bin/phonopy:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').run_script('phonopy==1.11.2', 'phonopy')
Traceback (most recent call last):
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 631, in _build_master
    ws.require(__requires__)
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 968, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 875, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (phonopy 2.20.0 (/home/wmg/anaconda3/lib/python3.11/site-packages/phonopy-2.20.0-py3.11-linux-x86_64.egg), Requirement.parse('phonopy==1.11.2'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/wmg/anaconda3/bin/phonopy", line 4, in <module>
    __import__('pkg_resources').run_script('phonopy==1.11.2', 'phonopy')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3327, in <module>
    @_call_aside
     ^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3302, in _call_aside
    f(*args, **kwargs)
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3340, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 633, in _build_master
    return cls._build_from_requirements(__requires__)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 646, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 870, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'fonttools>=4.22.0' distribution was not found and is required by matplotlib
(base) [wmg@localhost Pt4Ti03]$ phonopy -d --dim="2 2 2" -c POSCAR-UNITCELL
/home/wmg/anaconda3/bin/phonopy:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  __import__('pkg_resources').run_script('phonopy==1.11.2', 'phonopy')
Traceback (most recent call last):
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 631, in _build_master
    ws.require(__requires__)
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 968, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 875, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (phonopy 2.20.0 (/home/wmg/anaconda3/lib/python3.11/site-packages/phonopy-2.20.0-py3.11-linux-x86_64.egg), Requirement.parse('phonopy==1.11.2'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/wmg/anaconda3/bin/phonopy", line 4, in <module>
    __import__('pkg_resources').run_script('phonopy==1.11.2', 'phonopy')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3327, in <module>
    @_call_aside
     ^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3302, in _call_aside
    f(*args, **kwargs)
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3340, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 633, in _build_master
    return cls._build_from_requirements(__requires__)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 646, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/wmg/anaconda3/lib/python3.11/site-packages/pkg_resources/__init__.py", line 870, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'fonttools>=4.22.0' distribution was not found and is required by matplotlib

109

帖子

0

威望

491

eV
积分
600

Level 4 (黑子)

4#
发表于 Post on 2023-12-27 10:22:26 | 只看该作者 Only view this author
首先是第一个警告。
  1. pkg_resources.VersionConflict: (phonopy 2.20.0 (/home/wmg/anaconda3/lib/python3.11/site-packages/phonopy-2.20.0-py3.11-linux-x86_64.egg), Requirement.parse('phonopy==1.11.2'))
复制代码
这个脚本需要的版本是phonopy==1.11.2,你的太新了,可能存在问题,一般1.XX.X和2.XX.X之间算是比较大的版本更新了,这个要格外注意,不过也只是警告,无伤大雅。
你可以使用
  1. pip uninstall phonopy
  2. pip install phonopy==1.11.2
复制代码
先卸载,再安装指定版本解决。
其次是第二个问题。
  1. pkg_resources.DistributionNotFound: The 'fonttools>=4.22.0' distribution was not found and is required by matplotlib
复制代码
第二个问题是fonttools>=4.22.0没有找到,你也可以检查一下是否真的安装了
  1. pip list |grep "fonttools"
复制代码
如果没有安装的话,只需要pip install 就可以解决。





need offer

240

帖子

0

威望

1007

eV
积分
1247

Level 4 (黑子)

5#
 楼主 Author| 发表于 Post on 2023-12-27 16:20:00 | 只看该作者 Only view this author
Loading0760 发表于 2023-12-27 10:22
首先是第一个警告。
这个脚本需要的版本是phonopy==1.11.2,你的太新了,可能存在问题,一般1.XX.X和2.XX. ...

大神,我是菜鸟  没搞定
(base) [wmg@localhost Pt4Ti03]$ pip install fonttools 4.22.0
DEPRECATION: Loading egg at /home/wmg/anaconda3/lib/python3.11/site-packages/phonopy-1.11.2-py3.11-linux-x86_64.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
Requirement already satisfied: fonttools in /home/wmg/anaconda3/lib/python3.11/site-packages (4.25.0)

ERROR: Could not find a version that satisfies the requirement 4.22.0 (from versions: none)
ERROR: No matching distribution found for 4.22.0
(base) [wmg@localhost Pt4Ti03]$
(base) [wmg@localhost Pt4Ti03]$ pip install fonttools 4.25.0
DEPRECATION: Loading egg at /home/wmg/anaconda3/lib/python3.11/site-packages/phonopy-1.11.2-py3.11-linux-x86_64.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
Requirement already satisfied: fonttools in /home/wmg/anaconda3/lib/python3.11/site-packages (4.25.0)
ERROR: Could not find a version that satisfies the requirement 4.25.0 (from versions: none)
ERROR: No matching distribution found for 4.25.0
(base) [wmg@localhost Pt4Ti03]$ phonopy -d --dim="2 2 2" -c POSCAR-UNITCELL  
-bash: /home/wmg/anaconda3/bin/phonopy: No such file or directory
(base) [wmg@localhost Pt4Ti03]$

240

帖子

0

威望

1007

eV
积分
1247

Level 4 (黑子)

6#
 楼主 Author| 发表于 Post on 2023-12-27 16:20:08 | 只看该作者 Only view this author
wmg166 发表于 2023-12-27 16:20
大神,我是菜鸟  没搞定
(base) [wmg@localhost Pt4Ti03]$ pip install fonttools 4.22.0
DEPRECATIO ...

(base) [wmg@localhost ~]$ pip list |grep "fonttools"
DEPRECATION: Loading egg at /home/wmg/anaconda3/lib/python3.11/site-packages/phonopy-1.11.2-py3.11-linux-x86_64.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
fonttools                     4.25.0

本版积分规则 Credits rule

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2024-11-27 16:52 , Processed in 0.749190 second(s), 24 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list