python easy_install pylint Error: The system canno

2019-06-23 23:14发布

I was getting the error 'error: Setup script exited with error: The system cannot find the file specified' When i was trying to install pylint on my windows 7 machine using esay_install.

It is not working for pylint only. I successfully installed twitter, logilab-common-0.60.0 and logilab-astroid-4148103ea6f6.

Don't know what was wrong.

Below is the error what i got.


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

I searched extensively online but cannot find a solution. How do I fix this?

2条回答
我只想做你的唯一
2楼-- · 2019-06-24 00:02

I just ran into this same problem. While researching solutions, I came across this thread. Here's a link to my results, including a fix that worked for me.

查看更多
The star\"
3楼-- · 2019-06-24 00:15

I found a way to get it working on my Windows machine (Python 3.3). (It can be some steps are not needed. I did not go to deep into it.)

I tried to install pylint under a virtual env.

pip install pylint

And had the error as described in the question.

I made a bat file in the 'VIRTUALENV\Tools\Scripts' directory

@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 %*

added this to the PATH

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

I took the latest version of Pylint and its dependencies from the version control system

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

And 'compiled' them with the Python of the virtual env. First 'astroid', then'common' and 'pylint' itself

C:\tmp\pylint>c:\env\Scripts\python.exe setup.py install 
查看更多
登录 后发表回答