我一直在尝试使用这个库: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,
)
答案 0 :(得分:0)