1

I am trying to install the ant module from the command line and I get this error:

C:\Users\97252>pip install ant

Collecting ant
Using cached ant-0.1.0.tar.gz (18 kB)
Collecting msgpack-python==0.1.10

Using cached msgpack-python-0.1.10.tar.gz (48 kB)
Collecting pyserial==2.5

Using cached pyserial-2.5.tar.gz (106 kB)

  WARNING: Generating metadata for package pyserial produced metadata for project name pyserial-py3k. Fix your #egg=pyserial fragments.

ERROR: Requested pyserial-py3k from https://files.pythonhosted.org/packages/c3/9c/9f97e7749c2373031e5dab6e47adab3eabbd5720615d98845ff8bad5b273/pyserial-2.5.tar.gz#sha256=eddd22280e0dac0888c6cddd8906ebd902fa42467fee151c43ecde4196bbf511 (from ant) has different name in metadata: 'pyserial-py3k'

When I am trying to install it through the pyCharm IDE, I get this error:

Collecting ant
Using cached 

https://files.pythonhosted.org/packages/7e/9a/672711e3e9e264d7eee6048945f497d9fa9b311877f64fb74a7f297837da/ant-0.1.0.tar.gz

Collecting distribute (from ant)
 Using cached https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip

    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\dist.py", line 7, in <module>
        from setuptools.command.install import install
      File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\command\__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\command\install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\pkg_resources.py", line 1518, in <module>
        register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
    AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\97252\AppData\Local\Temp\pycharm-packaging\distribute\

Please help me.

martin clayton
  • 76,436
  • 32
  • 213
  • 198
Matan Ran
  • 33
  • 4

1 Answers1

0

You need to upgrade your setuptools by entering the command:

pip install --upgrade setuptools
Red
  • 26,798
  • 7
  • 36
  • 58
  • It is already set up. Requirement already satisfied: setuptools in c:\users\97252\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (51.1.2) – Matan Ran Jan 15 '21 at 13:59
  • @MatanRan Did you upgrade them? – Red Jan 15 '21 at 14:03
  • yes, I did upgrade them. And it shows the same error when I try to reinstall the 'ant' module again. – Matan Ran Jan 15 '21 at 14:06
  • @MatanRan Try super-usering it `sudo pip install --upgrade setuptools`. – Red Jan 15 '21 at 14:14
  • I am using windows – Matan Ran Jan 15 '21 at 14:20
  • @MatanRan Ok, try opening your cmd as administrator. – Red Jan 15 '21 at 14:21
  • I did it, and did all the instruction above, and it didn't worked. It shows the same error: WARNING: Generating metadata for package pyserial produced metadata for project name pyserial-py3k. Fix your #egg=pyserial fragments. – Matan Ran Jan 15 '21 at 14:24