私はオープンソースプロジェクト(GridCal)を持っており、ユーザにUNIXシステム用のpip install GridCal
またはpip3 install GridCal
というパッケージをインストールするように指示します。時間から依存関係のインストールに失敗したピップ
from distutils.core import setup
import sys
import os
import platform
from GridCal.grid.CalculationEngine import __GridCal_VERSION__
name = "GridCal"
version = str(__GridCal_VERSION__)
description = "Research Oriented electrical simulation software."
# Python 3.5 or later needed
if sys.version_info < (3, 5, 0, 'final', 0):
raise (SystemExit, 'Python 3.5 or later is required!')
# Build a list of all project modules
packages = []
for dir_name, dir_names, file_names in os.walk(name):
if '__init__.py' in file_names:
packages.append(dir_name.replace('/', '.'))
package_dir = {name: name}
# Data_files (e.g. doc) needs (directory, files-in-this-directory) tuples
data_files = []
for dir_name, dir_names, file_names in os.walk('doc'):
files_list = []
for filename in file_names:
fullname = os.path.join(dir_name, filename)
files_list.append(fullname)
data_files.append(('share/' + name + '/' + dir_name, files_list))
if platform.system() == 'Windows':
# list the packages (On windows anaconda is assumed)
required_packages = ["numpy",
"scipy",
"networkx",
"pandas",
"xlwt",
"xlrd",
# "PyQt5",
"matplotlib",
"qtconsole",
"pysot",
"openpyxl",
"pulp"
]
else:
# make the desktop entry
make_linux_desktop_file(version_=version, comment=description)
# list the packages
required_packages = ["numpy",
"scipy",
"networkx",
"pandas",
"xlwt",
"xlrd",
"PyQt5",
"matplotlib",
"qtconsole",
"pysot",
"openpyxl",
"pulp"
]
# Read the license
with open('LICENSE.txt', 'r') as f:
license_text = f.read()
setup(
# Application name:
name=name,
# Version number (initial):
version=version,
# Application author details:
author="Santiago Peñate Vera",
author_email="[email protected]",
# Packages
packages=packages,
data_files=data_files,
# Include additional files into the package
include_package_data=True,
# Details
url="http://pypi.python.org/pypi/GridCal/",
# License file
license=license_text,
# description
description=description,
# long_description=open("README.txt").read(),
# Dependent packages (distributions)
install_requires=required_packages,
setup_requires=required_packages
)
時間に私はプログラムをモジュールが不足しているというユーザーのレポートを取得:
セットアップファイルがこれですhttps://github.com/SanPen/GridCal/issues/12
私はinstall_requires
とsetup_requires
に両方のパッケージのリストを指定しています。
これはピンクのバグですか、それとも別のことをしなければなりませんか?
依存関係のリストに 'pyDOE'が表示されません。どのようにインストールされていますか?それはリストされた依存のdependenciyですか? – phd
私はあなたが 'install_requires'と' setup_requires'の両方を同時に必要とするのではないかと疑います。 https://pip.pypa.io/en/stable/user_guide/?highlight=setup_requires#installation-bundles:*最後に、setup.pyのsetup_requiresキーワードargに注意してください。 * – phd
pyDOEはpySOTと一緒にインストールされ、この設定はLinuxでは完全に機能し、時にはWindowsではあまりうまくいかない場合もあります。したがって、疑問。 –