运行安装库警告:install_lib:'build\lib'不存在 -- 没有Python模块可安装

13 投票
2 回答
14935 浏览
提问于 2025-04-18 17:33
c:\Python33>python.exe D:\program_python\module_setup\setups.py install
running install
running build
running build_py
running install_lib
**warning: install_lib: 'build\lib' does not exist -- no Python modules to in**


running install_egg_info
Removing c:\Python33\Lib\site-packages\find_elements_of_list-3.3.3-py3.3.eg
o
Writing c:\Python33\Lib\site-packages\find_elements_of_list-3.3.3-py3.3.egg

我遇到了这个错误(加粗的部分是错误信息),你能给我一些建议吗?这个问题出现在我使用32位的Windows 8操作系统和Python 3.3时,还有在使用Red Hat Linux 6和Python 2.6时也会出现。

c:\Python33>update modules list
'update' is not recognized as an internal or external command,
operable program or batch file.

2 个回答

1

我需要做两件事:

  1. 在设置目录里添加一个叫 __init__.py 的文件(这个文件可以是空的)

    ./main/setup.py
    ./main/setup/__init__.py
    
  2. 安装 cmake(如果还没安装的话)

    sudo apt-get install cmake
    
5

你需要进入应用程序所在的文件夹,然后运行这个文件。

c:\Python33>cd D:\program_python\module_setup
c:\Python33>cd D:
D:\program_python\module_setup> C:\Python33\python.exe setup.py install

撰写回答