计算化学公社

标题: 这个表示phonopy 安装成功了吗 [打印本页]

作者
Author:
wmg166    时间: 2023-12-26 17:57
标题: 这个表示phonopy 安装成功了吗
  这个表示phonopy 安装成功了吗   ?  我是在联网状态下   能 ping 通baidu .com  ,然后输入 pip  install  phonopy .安装的

作者
Author:
Loading0760    时间: 2023-12-26 19:44
是的,这样就显示安装成功了。 你上面的“付付付付”有点意思,感觉是不是中文编码错误。
作者
Author:
wmg166    时间: 2023-12-27 10:04
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


作者
Author:
Loading0760    时间: 2023-12-27 10:22
首先是第一个警告。
  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 就可以解决。






作者
Author:
wmg166    时间: 2023-12-27 16:20
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]$


作者
Author:
wmg166    时间: 2023-12-27 16:20
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





欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3