Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 为收集的包构建轮子非常缓慢,而且内存要求很高。我能跳过它吗?_Python_Installation_Pip_Setup.py - Fatal编程技术网

Python 为收集的包构建轮子非常缓慢,而且内存要求很高。我能跳过它吗?

Python 为收集的包构建轮子非常缓慢,而且内存要求很高。我能跳过它吗?,python,installation,pip,setup.py,Python,Installation,Pip,Setup.py,我的项目有这个setup.py文件,我正在使用Python3.7运行Anaconda3: from setuptools import setup, find_packages from setuptools.command.install import install as InstallCommand def parse_requirements(requirements): with open(requirements) as f: return [l.stri

我的项目有这个setup.py文件,我正在使用Python3.7运行Anaconda3:

from setuptools import setup, find_packages
from setuptools.command.install import install as InstallCommand


def parse_requirements(requirements):
    with open(requirements) as f:
        return [l.strip('\n') for l in f if l.strip('\n') and not l.startswith('#')]


class Install(InstallCommand):
    """ Customized setuptools install command which uses pip. """

    def run(self, *args, **kwargs):
        from pip._internal import main as _main
        _main(['install', '.'])
        InstallCommand.run(self, *args, **kwargs)


setup(
    name="NGF",
    author="Ties van Rozendaal",
    author_email="git@tivaro.nl",
    maintainer="Thomas Evangelidis",
    maintainer_email="tevang3@gmail.com",
    description="\n*** An implementation of Convolutional Networks on Graphs for Learning Molecular Fingerprints in Keras 2.x. ***\n",
    long_description="Read the README.md file.",
    url="https://github.com/iwatobipen/keras-neural-graph-fingerprint",
    license="MIT.",
    version="1.0",
    platforms="Unix",
    dependency_links=[],
    cmdclass={
        'install': Install,
    },
    packages=find_packages(where='.', exclude=()),
    # package_dir={'':'dev'},
    install_requires=parse_requirements('requirements.txt')
)
“requirements.txt”文件的内容包括:

pip==19.0.3
tensorflow==1.13.1
setuptools==40.8.0
Keras==2.2.4
numpy==1.16.2
当我这样做时:

pip install <project dir>/
pip安装/

Python构建了一些巨大的轮子,这些轮子需要很长时间才能完成,最终会消耗掉所有的内存!我不知道它到底是做什么的,也许它为TysFooFor和Keras构建了一个轮子,它是C++中带有Python包装的大包装。我只想让pip检查是否安装了所需的模块,如果没有,则安装它们,然后将我的项目的python文件复制到“~/Anaconda3/lib/python3.7/site packages/”。太简单了!我该怎么做呢?

尽管您可以使用
--no binary
选项跳过构建程序包的控制盘,但这并不能解决您的问题,因为您提到的程序包在程序包安装阶段或早或晚都需要将C扩展程序构建为二进制libs,因此您只需要通过跳过控制盘构建来延迟。问题在于预编译的控制盘不适用于您的平台/arch/python版本。此外,水蟒是一种不同的动物;尝试使用
conda
安装依赖项,因为它们很可能是预编译的。我不太明白。首先,我尝试了
pip安装keras神经图指纹/--无二进制:all
,但没有任何区别。是否可以使用
conda
安装我的软件包?我找不到方法。至于
——没有二进制文件,你用错了
pip安装pkgname——无二进制文件=:all:
正确。然而,正如我已经写的,它不会“加速”安装。