Python Setup.py给出了ModuleNotFoundError

时间:2017-05-02 06:21:04

标签: python installation pip

我一直在尝试使用这个库:latbin (https://pypi.python.org/pypi/latbin

pip没用 然后下载文件并使用:python setup.py install 更改了该文件夹中的当前目录(窗口)

  C:\...\latbin-0.1.4.tar\dist\latbin>python setup.py install
Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    import latbin
ModuleNotFoundError: No module named 'latbin'

使用与下载相同的目录结构。

顺便说一下,这是setup.py代码:

import os
os.chdir("C:/.../latbin-0.1.4.tar/dist/latbin/")
from distutils.core import setup
#from setuptools import setup, find_packages
import latbin

packages = ['latbin']
install_requires = ['numpy>=1.8','scipy>=0.14','pandas>=0.14']
ext_modules = []

setup(
    name='latbin',
    author="Tim Anderton, Dylan Gregersen",
    author_email='<quidditymaster@gmail.com>;<dylan.gregersen@utah.edu>',
    url="https://github.com/astrodsg/latbin",
    license="3-clause BSD style license",
    description="Python lattice binning package for large data",
    long_description=open("README.rst").read(),
    classifiers=["Development Status :: 3 - Alpha",
                 "Intended Audience :: Developers",
                 "Intended Audience :: Science/Research",
                 "License :: OSI Approved :: BSD License",
                 "Natural Language :: English",
                 "Programming Language :: Python",
                 "Topic :: Scientific/Engineering :: Mathematics",
                 "Topic :: Scientific/Engineering :: Physics"],
    platforms='any',
    version=latbin.__version__,
    #packages=find_packages(),
    packages=packages,
    ext_modules=ext_modules,
    install_requires=install_requires,
    )

1 个答案:

答案 0 :(得分:0)

嗯,这不一定是这个问题的答案......但是它在Anaconda Distribution中有效,以前我在尝试使用WinPython但仍然没有用。

终于找到了正确的答案:

It was a bug

相关问题