简体   繁体   English

安装 ddsp python 模块时出现问题 9ModuleNotFoundError: No module named 'ddsp')

[英]problem in installing the ddsp python module 9ModuleNotFoundError: No module named 'ddsp')

I am trying to run the below colab page in my Ubuntu pc by the Conda Jupiter notebook as local, but I can not install the ddsp module and by running its GitHub instruction like below (result of my tries could be seen here ):我正在尝试通过 Conda Jupiter 笔记本在我的 Ubuntu pc 中将以下 colab 页面作为本地运行,但我无法安装ddsp模块并通过运行如下所示的GitHub 指令(我的尝试结果可以在这里看到):

在此处输入图片说明

sudo apt-get install libsndfile-dev
pip install --upgrade pip
pip install --upgrade ddsp
(tensorflow2_5) so@so-Lenovo-ideapad-310-15IKB:~/Downloads$ sudo pip install --upgrade ddsp
WARNING: The directory '/home/so/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: ddsp in /usr/local/lib/python3.6/dist-packages (1.4.0)
Requirement already satisfied: future in /usr/local/lib/python3.6/dist-packages (from      
....


Requirement already satisfied: dataclasses in /usr/local/lib/python3.6/dist-packages (from tfds-nightly->ddsp) (0.8)
WARNING: You are using pip version 21.0.1; however, version 21.1.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.

I show some tings, but finally it is not installed and show the below error:我显示了一些 tings,但最后它没有安装并显示以下错误:

(tensorflow2_5) so@so-Lenovo-ideapad-310-15IKB:~/Downloads$ python
Python 3.9.5 | packaged by conda-forge | (default, Jun 19 2021, 00:32:32) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ddsp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ddsp'

Update:更新:

According to answer, I have tried to install the Python 3.9.5 with conda update python but after installing new python by pip install --upgrade ddsp and also sudo pip install --upgrade ddsp but it is not installed, as you can see here .根据答案,我尝试使用conda update python安装 Python 3.9.5,但是在通过pip install --upgrade ddspsudo pip install --upgrade ddsp安装新的 python 之后,但它没有安装,正如你在这里看到的.

The problem is you install ddsp using sudo which will install the module as root user.问题是您使用sudo安装ddsp它将以root用户身份安装模块。 That's why you see some python version 3.6 however your python version should be 3.9.5这就是为什么你会看到一些 python 版本 3.6 但是你的 python 版本应该是 3.9.5

Can you try to install without sudo ?您可以尝试在没有sudo情况下安装吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM