繁体   English   中英

python easy_install pylint错误:系统找不到指定的文件

[英]python easy_install pylint Error: The system cannot find the file specified

我收到错误'错误:安装脚本退出时出现错误:系统无法找到指定的文件'当我尝试使用esay_install在我的Windows 7机器上安装pylint时。

它不适用于pylint。 我成功安装了twitter,logilab-common-0.60.0和logilab-astroid-4148103ea6f6。

不知道出了什么问题。

以下是我得到的错误。


C:\>easy_install pylint
Creating c:\python33\lib\site-packages\site.py
Searching for pylint
Best match: pylint 0.28.0
Processing pylint-0.28.0-py3.3.egg
pylint 0.28.0 is already the active version in easy-install.pth
Installing epylint script to C:\Python33\Scripts
Installing epylint.bat script to C:\Python33\Scripts
Installing pylint script to C:\Python33\Scripts
Installing pylint-gui script to C:\Python33\Scripts
Installing pylint-gui.bat script to C:\Python33\Scripts
Installing pylint.bat script to C:\Python33\Scripts
Installing pyreverse script to C:\Python33\Scripts
Installing pyreverse.bat script to C:\Python33\Scripts
Installing symilar script to C:\Python33\Scripts
Installing symilar.bat script to C:\Python33\Scripts
Installing pylint-script.py script to C:\Python33\Scripts
Installing pylint.exe script to C:\Python33\Scripts
Installing pylint-gui-script.py script to C:\Python33\Scripts
Installing pylint-gui.exe script to C:\Python33\Scripts
Installing symilar-script.py script to C:\Python33\Scripts
Installing symilar.exe script to C:\Python33\Scripts
Installing epylint-script.py script to C:\Python33\Scripts
Installing epylint.exe script to C:\Python33\Scripts
Installing pyreverse-script.py script to C:\Python33\Scripts
Installing pyreverse.exe script to C:\Python33\Scripts

Using c:\python33\lib\site-packages\pylint-0.28.0-py3.3.egg
Processing dependencies for pylint
Searching for logilab-astng>=0.24.3
Reading https://pypi.python.org/simple/logilab-astng/
Best match: logilab-astng 0.24.3
Downloading https://pypi.python.org/packages/source/l/logilab-astng/logilab-astn
g-0.24.3.tar.gz#md5=f0dd5dee1d5053939da174e1bfe69388
Processing logilab-astng-0.24.3.tar.gz
Writing c:\users\zenq\appdata\local\temp\easy_install-glk_0e\logilab-astng-0.24.
3\setup.cfg
Running logilab-astng-0.24.3\setup.py -q bdist_egg --dist-dir c:\users\zenq\appd
ata\local\temp\easy_install-glk_0e\logilab-astng-0.24.3\egg-dist-tmp-xzupoo
package init file '.\test\__init__.py' not found (or not a regular file)
Not SVN Repository
package init file '.\test\__init__.py' not found (or not a regular file)
package init file '.\test\__init__.py' not found (or not a regular file)
running 2to3 on build\lib\logilab\astng\brain
error: Setup script exited with error: The system cannot find the file specified

我在网上广泛搜索但找不到解决方案。 我该如何解决?

我找到了一种方法让它在我的Windows机器上工作(Python 3.3)。 (可能不需要一些步骤。我没有深入研究它。)

我试图在虚拟环境下安装pylint。

pip install pylint

并且有问题中描述的错误。

我在'VIRTUALENV \\ Tools \\ Scripts'目录中创建了一个bat文件

@echo off
rem Use python to execute the python script having the same name as this batch
rem file, but without any extension, located in the same directory as this
rem batch file
c:\env\Scripts\python.exe "%~dpn0".py %*

将此添加到PATH中

C:\tmp\pylint>set PATH=c:\env\Tools\Scripts;%PATH%

我从版本控制系统中获取了最新版本的Pylint及其依赖项

hg clone https://bitbucket.org/logilab/pylint/
hg clone https://bitbucket.org/logilab/astroid
hg clone http://hg.logilab.org/logilab/common

并使用虚拟环境的Python“编译”它们。 首先是“astroid”,然后是“common”和“pylint”本身

C:\tmp\pylint>c:\env\Scripts\python.exe setup.py install 

我刚遇到同样的问题。 在研究解决方案时,我遇到了这个问题。 这是我的结果的链接 ,包括一个对我有用的修复。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM