0

Due to firewall blocked the pip installer , I have to download the tar file and use setup tool to install package as below :

python setup.py install

My python version is py 2.75 so I choosed the pylint 1.9.3 according to instruction. But it turns out below error message :

Couldn't find index page for 'pytest-runner' (maybe misspelled?) No local packages or download links found for pytest-runner Traceback (most recent call last): File "setup.py", line 181, in install() File "setup.py", line 178, in install **kwargs) File "C:\Program Files (x86)\Python27\lib\distutils\core.py", line 112, in setup _setup_distribution = dist = klass(attrs) File "C:\Program Files (x86)\Python27\lib\site-packages\setuptools\dist.py", line 260, in init self.fetch_build_eggs(attrs.pop('setup_requires')) File "C:\Program Files (x86)\Python27\lib\site-packages\setuptools\dist.py", line 284, in fetch_build_eggs parse_requirements(requires), installer=self.fetch_build_egg File "C:\Program Files (x86)\Python27\lib\site-packages\pkg_resources__init__.py", line 777, in resolve replace_conflicting=replace_conflicting File "C:\Program Files (x86)\Python27\lib\site-packages\pkg_resources__init__.py", line 1060, in best_match return self.obtain(req, installer) File "C:\Program Files (x86)\Python27\lib\site-packages\pkg_resources__init__.py", line 1072, in obtain return installer(requirement) File "C:\Program Files (x86)\Python27\lib\site-packages\setuptools\dist.py", line 327, in fetch_build_egg return cmd.easy_install(req) File "C:\Program Files (x86)\Python27\lib\site-packages\setuptools\command\easy_install.py", line 434, in easy_install self.local_index File "C:\Program Files (x86)\Python27\lib\site-packages\setuptools\package_index.py", line 475, in fetch_distribution return dist.clone(location=self.download(dist.location, tmpdir)) AttributeError: 'NoneType' object has no attribute 'clone'

seedof
  • 11
  • 3
  • did you try using .whl files of setup – Umer Sep 26 '18 at 11:36
  • I tried, pip install xxx.whl, it turns out error message as below Could not fetch URL https://pypi.org/simple/isort/: ..... I think this is due to firewall – seedof Sep 26 '18 at 11:41
  • first try to clone from github using git...that install from that – Umer Sep 26 '18 at 11:46
  • @UmerFarooq Thanks for tip, do you have link for detail instruction ? – seedof Sep 26 '18 at 11:47
  • just google the name of package along with GitHub you will find it....like: `pandas github` – Umer Sep 26 '18 at 11:50
  • also see this link also for installation https://stackoverflow.com/questions/15268953/how-to-install-python-package-from-github – Umer Sep 26 '18 at 11:51
  • @UmerFarooq what's the difference between clone and download zip ? After clone , I still have to run setup.py , right ? – seedof Sep 27 '18 at 06:56
  • difference me be the source you are use to download or clone.....yes... – Umer Sep 27 '18 at 07:00
  • @UmerFarooq it failed as below : (is this connectivity issue ?) $ git clone https://github.com/PyCQA/pylint.git Cloning into 'pylint'... ls remote: Enumerating objects: 52, done. remote: Counting objects: 100% (52/52), done. remote: Compressing objects: 100% (32/32), done. error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: the remote end hung up unexpectedly86 MiB | 20.00 KiB/s fatal: early EOF fatal: index-pack failed – seedof Sep 27 '18 at 07:10
  • have you have git.....if there is problem while running git then there may be some problem due to firewall. – Umer Sep 27 '18 at 07:15

1 Answers1

0

I found it is setuptools issue. I reinstall the setuptools but it does not work. Search for "easy_install" in Scripts folder, find some old easy_installxxx pyc,py file/folder which is older than my reinstall date. Delete them. Reinstalled the setuptools

easy_install --version

It shows latest version now. Then do again

python setup.py install

Now it works.

seedof
  • 11
  • 3