pip install不安装软件包,仅dist-info文件夹

时间:2019-08-15 07:15:38

标签: python python-3.x pip setuptools

我的软件包没有通过pip完全安装。导入模块不起作用,并且站点软件包中只有dist-info目录。我无法通过其他帖子解决问题。我有以下包装结构。

idbd_utils
+-- ncbi_taxonomy_utils
|   +-- __init__.py
|   +-- ncbi_taxonomy_utils.py 
|   +-- ncbi_taxonomy_all_names.dat
|   +-- ncbi_taxonomy_canonical_taxa.dat
|   +-- ncbi_taxonomy_children_nodes.dat
|   +-- ncbi_taxonomy_max_taxid.dat
|   +-- ncbi_taxonomy_merged.dat
|   +-- ncbi_taxonomy_names.dat
|   +-- ncbi_taxonomy_nodes_rank.dat
|   +-- ncbi_taxonomy_nodes_rel.dat
+-- LICENSE
+-- README.md
+-- MANIFEST.in
+-- setup.py

这是我的setup.py

import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name="idbd_utils",
    version="0.0.1",
    author="Me",
    author_email="none@nomail.com",
    description="My packages",
    long_description=long_description,
    long_description_content_type="text/markdown",
    packages=setuptools.find_packages(),
    include_package_data=True,
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: None",
        "Operating System :: OS Independent",
    ],
)

要构建,我在my_pckgs目录中使用此命令 python3 setup.py sdist bdist_wheel

然后我用pip install .

进行安装

完成所有操作后,站点程序包中只有my-pckgs-0.0.1.dist-info,而功能包中则没有。这特别令人沮丧,因为在我更改父目录的名称(即my_pckgs,此处只是化名,以及所有其他文件名)之前,它工作得很好。我尝试从头开始在新目录中进行操作,但是仍然遇到相同的问题。

pip install . -vvv的输出

Created temporary directory: /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-ephem-wheel-cache-6l8zh6wh
Created temporary directory: /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-tracker-witkmyvg
Created requirements tracker '/private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-tracker-witkmyvg'
Created temporary directory: /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-install-wldtr1vp
Processing /Users/jmontgomery/Desktop/idbd_utils
  Created temporary directory: /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-build-ckfi4xc3
  Added file:///Users/jmontgomery/Desktop/idbd_utils to build tracker '/private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-tracker-witkmyvg'
    Running setup.py (path:/private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-build-ckfi4xc3/setup.py) egg_info for package from file:///Users/jmontgomery/Desktop/idbd_utils
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/idbd_utils.egg-info
    writing pip-egg-info/idbd_utils.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/idbd_utils.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/idbd_utils.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/idbd_utils.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/idbd_utils.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/idbd_utils.egg-info/SOURCES.txt'
  Source in /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-build-ckfi4xc3 has version 0.0.1, which satisfies requirement idbd-utils==0.0.1 from file:///Users/jmontgomery/Desktop/idbd_utils
  Removed idbd-utils==0.0.1 from file:///Users/jmontgomery/Desktop/idbd_utils from build tracker '/private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-tracker-witkmyvg'
Building wheels for collected packages: idbd-utils
  Created temporary directory: /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-wheel-q47gqxjx
  Building wheel for idbd-utils (setup.py) ...   Destination directory: /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-wheel-q47gqxjx
  Running command /Users/jmontgomery/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-build-ckfi4xc3/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-wheel-q47gqxjx --python-tag cp37
  running bdist_wheel
  running build
  running build_py
  running egg_info
  writing idbd_utils.egg-info/PKG-INFO
  writing dependency_links to idbd_utils.egg-info/dependency_links.txt
  writing top-level names to idbd_utils.egg-info/top_level.txt
  reading manifest file 'idbd_utils.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'idbd_utils.egg-info/SOURCES.txt'
  installing to build/bdist.macosx-10.7-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.macosx-10.7-x86_64/wheel
  creating build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/ncbi_taxonomy_canonical_taxa.dat -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/ncbi_taxonomy_names.dat -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/ncbi_taxonomy_nodes_rank.dat -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/ncbi_taxonomy_utils.py -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/__init__.py -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/ncbi_taxonomy_nodes_rel.dat -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/ncbi_taxonomy_all_names.dat -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/ncbi_taxonomy_children_nodes.dat -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/ncbi_taxonomy_max_taxid.dat -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  copying build/lib/ncbi_taxonomy_utils/ncbi_taxonomy_merged.dat -> build/bdist.macosx-10.7-x86_64/wheel/ncbi_taxonomy_utils
  running install_egg_info
  Copying idbd_utils.egg-info to build/bdist.macosx-10.7-x86_64/wheel/idbd_utils-0.0.1-py3.7.egg-info
  running install_scripts
  adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
  creating build/bdist.macosx-10.7-x86_64/wheel/idbd_utils-0.0.1.dist-info/WHEEL
  creating '/private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-wheel-q47gqxjx/idbd_utils-0.0.1-cp37-none-any.whl' and adding 'build/bdist.macosx-10.7-x86_64/wheel' to it
  adding 'ncbi_taxonomy_utils/__init__.py'
  adding 'ncbi_taxonomy_utils/ncbi_taxonomy_all_names.dat'
  adding 'ncbi_taxonomy_utils/ncbi_taxonomy_canonical_taxa.dat'
  adding 'ncbi_taxonomy_utils/ncbi_taxonomy_children_nodes.dat'
  adding 'ncbi_taxonomy_utils/ncbi_taxonomy_max_taxid.dat'
  adding 'ncbi_taxonomy_utils/ncbi_taxonomy_merged.dat'
  adding 'ncbi_taxonomy_utils/ncbi_taxonomy_names.dat'
  adding 'ncbi_taxonomy_utils/ncbi_taxonomy_nodes_rank.dat'
  adding 'ncbi_taxonomy_utils/ncbi_taxonomy_nodes_rel.dat'
  adding 'ncbi_taxonomy_utils/ncbi_taxonomy_utils.py'
  adding 'idbd_utils-0.0.1.dist-info/LICENSE'
  adding 'idbd_utils-0.0.1.dist-info/METADATA'
  adding 'idbd_utils-0.0.1.dist-info/WHEEL'
  adding 'idbd_utils-0.0.1.dist-info/top_level.txt'
  adding 'idbd_utils-0.0.1.dist-info/RECORD'
  removing build/bdist.macosx-10.7-x86_64/wheel
done
  Stored in directory: /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-ephem-wheel-cache-6l8zh6wh/wheels/4b/52/74/ad0979a3cf5ca994d3db19b67a30f9f89fcd4bf541f2f6c64c
  Removing source in /private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-build-ckfi4xc3
Successfully built idbd-utils
Installing collected packages: idbd-utils

Successfully installed idbd-utils-0.0.1
Cleaning up...
Removed build tracker '/private/var/folders/6z/rh94tt3x73sbzgdnk29bxjnh0000gn/T/pip-req-tracker-witkmyvg'

0 个答案:

没有答案