I did a fresh python3 installation on OSX via homebrew:
我通过homebrew在OSX上做了一个全新的python3安装:
brew install python3
Then I created a virtual environment for my project and installed scipy
and scikits.samplerate
:
然后我为我的项目创建了一个虚拟环境,并安装了scipy和scikit。
virtualenv -p /usr/local/bin/python3 pythen_env
pip install scipy
pip install scikits.samplerate
However, when I try to import a function from scikits.samplerate
, I get the following error:
但是,当我尝试从scikit中导入一个函数时。采样时,我得到以下错误:
>>> from scikits.samplerate import resample
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/my/project/path/pythen_env/lib/python3.6/site-packages/scikits/samplerate/__init__.py", line 4, in <module>
from info import __doc__
ModuleNotFoundError: No module named 'info'
Info happens to be the first module from the package itself that is imported in __init__.py
.
Info恰好是包本身的第一个模块,它是在__init__.py中导入的。
Strangely, the module info.py
exists in /my/project/path/pythen_env/lib/python3.6/site-packages/scikits/samplerate/
:
奇怪的是,该模块信息。py存在于/我的/项目/道路/ pythen_env / lib / python3.6 /网站/ scikits samplerate /:
ls /my/project/path/pythen_env/lib/python3.6/site-packages/scikits/samplerate/
__init__.py setup.py tests __pycache__
info.py setuphelp.py version.py
The error also happens when I try the same without virtualenv
, as well as for other packages. How could I start to debug this issue?
当我在没有virtualenv和其他包的情况下尝试相同的操作时,也会发生错误。我如何开始调试这个问题?
2 个解决方案
#1
1
The problem seems to be that the package scikits.samplerate
does not support Python 3.X (see issue). However, there is a fork which supports Python 3.X. You can install it via
问题似乎是包剪刀。samplerate不支持Python 3。X(见问题)。但是,有一个支持Python 3.X的fork。您可以通过
$ pip install git+https://github.com/gregorias/samplerate.git
As always: people can make anything they like in repositories. I did not check which changes gregorias made.
一如既往:人们可以在存储库中制作任何他们喜欢的东西。我没有检查格雷戈里亚斯做了哪些改变。
#2
1
the git version does support py3
git版本支持py3
https://github.com/cournape/samplerate
https://github.com/cournape/samplerate
(merged the PR from @gregorias)
(从@gregorias合并PR)
I should find the time and procedure to update pypi too...
我也应该找到更新pypi的时间和流程……
#1
1
The problem seems to be that the package scikits.samplerate
does not support Python 3.X (see issue). However, there is a fork which supports Python 3.X. You can install it via
问题似乎是包剪刀。samplerate不支持Python 3。X(见问题)。但是,有一个支持Python 3.X的fork。您可以通过
$ pip install git+https://github.com/gregorias/samplerate.git
As always: people can make anything they like in repositories. I did not check which changes gregorias made.
一如既往:人们可以在存储库中制作任何他们喜欢的东西。我没有检查格雷戈里亚斯做了哪些改变。
#2
1
the git version does support py3
git版本支持py3
https://github.com/cournape/samplerate
https://github.com/cournape/samplerate
(merged the PR from @gregorias)
(从@gregorias合并PR)
I should find the time and procedure to update pypi too...
我也应该找到更新pypi的时间和流程……