一、使用方法

  • 安装命令   $ pip install  -e  <option>

  • setup.py

二、具体介绍

  • pip intall -e

  • 举例一个setup.py

$ pip intall -e ".[train]"

from setuptools import setup, find_packages
import setuptools.command.develop
import setuptools.command.build_py
import os
import subprocess version = '0.0.1' # Adapted from https://github.com/pytorch/pytorch
cwd = os.path.dirname(os.path.abspath(__file__))
if os.getenv('TACOTRON_BUILD_VERSION'):
version = os.getenv('TACOTRON_BUILD_VERSION')
else:
try:
sha = subprocess.check_output(
['git', 'rev-parse', 'HEAD'], cwd=cwd).decode('ascii').strip()
version += '+' + sha[:7]
except subprocess.CalledProcessError:
pass class build_py(setuptools.command.build_py.build_py): def run(self):
self.create_version_file()
setuptools.command.build_py.build_py.run(self) @staticmethod
def create_version_file():
global version, cwd
print('-- Building version ' + version)
version_path = os.path.join(cwd, 'deepvoice3_pytorch', 'version.py')
with open(version_path, 'w') as f:
f.write("__version__ = '{}'\n".format(version)) class develop(setuptools.command.develop.develop): def run(self):
build_py.create_version_file()
setuptools.command.develop.develop.run(self) setup(name='deepvoice3_pytorch',
version=version,
description='PyTorch implementation of Tacotron speech synthesis model.',
packages=find_packages(),
cmdclass={
'build_py': build_py,
'develop': develop,
},
install_requires=[
"numpy",
"scipy",
"unidecode",
"inflect",
"librosa",
"numba",
"lws <= 1.0",
],
extras_require={
"train": [
"docopt",
"tqdm",
"tensorboardX",
"nnmnkwii >= 0.0.9",
"nltk",
],
"test": [
"nose",
],
"jp": [
"jaconv",
"mecab-python3",
],
})

  

通过setup.py安装项目dependencies的更多相关文章

  1. 使用setup.py安装python包和卸载python包的方法

    使用setup.py安装python包和卸载python包的方法 记录安装后文件的路径 python setup.py install --record files.txt删除这些文件 cat fil ...

  2. python:用setup.py安装第三方包packages

    python:用setup.py安装第三方包packages 原创 2016年12月10日 15:17:56 标签: python 8531 这次来介绍下python第三方包的安装,前面介绍了3种方式 ...

  3. 用setup.py安装第三方包packages

    这次要说的是用setup.py 来安装第三方包.步骤如下: 步骤:setup.py 先下载你要安装的包,并解压到磁盘下: 进入到该文件的setup.py 目录下 ,打开cmd,并切换到该目录下: 先执 ...

  4. python 通过setup.py安装和卸载python软件包

    安装:sudo python setup.py install 卸载:sudo python setup.py install --record log sudo cat log | sudo xar ...

  5. python 通过下载包setup.py安装模块

    下载安装包,并解压到相应的位置 1.打开cmd 2.到达安装目录 3.python setup.py build 4.python setup.py install

  6. python setup.py 安装和卸载 的正确姿势

    1.install python setup.py install --record files.txt 2. uninstall 删除这些文件 cat files.txt | xargs rm -r ...

  7. Setup Project 安装项目

    从vs2012起,微软已经不支持setup project了.以此纪念一下setup project.   在新建Setup Project   增加安装内容,通常是直接Oupput一个项目,或者直接 ...

  8. 如何卸载Python通过setup.py安装的模块

    0,pip uninstall  xxxx     1.找到egg sudo easy_install -m BitVector .... Using /usr/local/lib/python2./ ...

  9. ubuntu setup.py 安装时报Error -5 while decompressing data: incomplete or truncated stream

    缺少 python-devel 包 apt-get install python-dev -y

随机推荐

  1. elasticsearch(es) 集群恢复触发配置(Local Gateway参数)

    elasticsearch(es) 集群恢复触发配置(Local Gateway) 当你集群重启时,几个配置项影响你的分片恢复的表现. 首先,我们需要明白如果什么也没配置将会发生什么. 想象一下假设你 ...

  2. 科学计算库Numpy(1)

    Numpy 一,数据结构 数据类型: ndarray import numpy world_alchol = numpy.genfromtxt('world_alchol.txt',delimiter ...

  3. php中print、echo、print_r、var_dump的区别

    echo,print,print_r,var_dump区别 print只能接收一个字符串:print有返回值1(可在表达式中使用) e.g print 'string 1' e.g if($exp & ...

  4. hibrnate缓存

    缓存: 是计算机领域的概念,它介于应用程序和永久性数据存储源之间. 缓存: 一般人的理解是在内存中的一块空间,可以将二级缓存配置到硬盘.用白话来说,就是一个存储数据的容器.我们关注的是,哪些数据需要被 ...

  5. O/R关系的深入理解(转载)

    本文转载自aa8945163: http://aa8945163.iteye.com/blog/859713 什么是O/R Mapping? 广义上,ORM指的是面向对象的对象模型和关系型数据库的数据 ...

  6. Python入门 (二)

    本文是个人python学习笔记,学习资料为廖雪峰python教程,如需更多内容,请移步廖老师官方网站. 一 函数式编程Functional Programming 函数式编程允许把函数本身作为参数传入 ...

  7. Codeforces 1105B:Zuhair and Strings(字符串水题)

    time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: sta ...

  8. laravel-阿里大于

    安装扩展 # 安装curl模块apt-get install curl # 安装php5-curl扩展apt-get install php5-curl # 安装laravel阿里大鱼服务compos ...

  9. cordova文件系统插件的使用方法:cordova-plugin-file

    提供对设备上的文件进行读取和写入的功能支持. 1. 添加插件:cordova plugin add cordova-plugin-file 2. 调用方法:

  10. skimage

    它是由python语言编写的,   子模块名称 主要实现功能 io 读取.保存和显示图片或视频 data 提供一些测试图片和样本数据 color 颜色空间变换 filters 图像增强.边缘检测.排序 ...