Pysoundfile库未导入

时间:2019-12-25 20:27:46

标签: python anaconda conda pysoundfile

我是Python的新手(几周前我在Windows 10机器上安装了Anaconda发行版),并且无法从Spyder ipython控制台导入pysoundfile库。这些是我遵循的步骤:

1)我在这里找到了安装pysound的说明:https://anaconda.org/conda-forge/pysoundfile

2)在Spyder的ipython控制台上,我输入:
    康达安装-c康达伪造pysoundfile

这给了我一个警告,我需要重启内核,然后我通过关闭ipython并打开一个新的控制台来做到这一点(我也尝试退出python并重新打开)

3)在ipython中,我输入

import pysoundfile

这给了我以下消息:ModuleNotFoundError:没有名为“ pysoundfile”的模块

我再次重复了步骤2,但这一次在执行conda命令后出现了下面的长错误。

我不确定自己在做什么错。

任何帮助将不胜感激。谢谢。


conda install -c conda-forge pysoundfile
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

Note: you may need to restart the kernel to use updated packages.

Finding conflicts:   0%|          | 0/11 [00:00<?, ?it/s]
Examining ca-certificates:   0%|          | 0/11 [00:00<?, ?it/s]
Examining openssl:   9%|9         | 1/11 [00:00<?, ?it/s]        
Examining vc:  18%|#8        | 2/11 [00:00<?, ?it/s]     
Examining sqlite:  27%|##7       | 3/11 [00:00<?, ?it/s]
Examining pip:  36%|###6      | 4/11 [00:00<?, ?it/s]   
Examining wheel:  45%|####5     | 5/11 [00:00<?, ?it/s]
Examining certifi:  55%|#####4    | 6/11 [00:00<?, ?it/s]
Examining python:  64%|######3   | 7/11 [00:00<?, ?it/s] 
Examining setuptools:  73%|#######2  | 8/11 [00:00<00:00, 8000.58it/s]
Examining wincertstore:  82%|########1 | 9/11 [00:00<00:00, 9000.65it/s]
Examining vs2015_runtime:  91%|######### | 10/11 [00:00<00:00, 10000.72it/s]


UnsatisfiableError: The following specifications were found to be incompatible with each other:



Package cffi conflicts for:

pysoundfile -> cffi
Package vc conflicts for:
python=3.7 -> vc[version='14.*|>=14,<15.0a0|>=14.1,<15.0a0']
Package numpy conflicts for:
pysoundfile -> numpy
Package libsndfile conflicts for:
pysoundfile -> libsndfile
Package openssl conflicts for:
python=3.7 -> openssl[version='>=1.1.1a,<1.1.2a|>=1.1.1b,<1.1.2a|>=1.1.1c,<1.1.2a|>=1.1.1d,<1.1.2a']
Package libgcc-ng conflicts for:
pysoundfile -> libgcc-ng[version='>=4.9|>=7.3.0']
Package pip conflicts for:
python=3.7 -> pip
Package sqlite conflicts for:
python=3.7 -> sqlite[version='>=3.25.3,<4.0a0|>=3.26.0,<4.0a0|>=3.27.2,<4.0a0|>=3.28.0,<4.0a0|>=3.29.0,<4.0a0|>=3.30.1,<4.0a0']
Package vs2015_runtime conflicts for:
python=3.7 -> vs2015_runtime[version='>=14.16.27012,<15.0a0']

1 个答案:

答案 0 :(得分:0)

我能够安装Pysoundfile,这是我遵循的步骤:

  1. 从Windows打开Anaconda Prompt程序
  2. 输入“ pip安装声音文件”
  3. 在Windows中启动Spyder程序
  4. 在ipython控制台提示符下,键入“导入声音文件”

我不确定为什么其他人可以使用的conda命令对我来说不起作用,但是由于我有解决方案,因此现在我已经准备就绪。

谢谢大家的建议。