Matan Ran
Matan Ran

Reputation: 33

Trying to install ant module in python and get this error

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.

Upvotes: 1

Views: 830

Answers (1)

Red
Red

Reputation: 27557

You need to upgrade your setuptools by entering the command:

pip install --upgrade setuptools

Upvotes: 0

Related Questions