I am trying to install the constants module through the command line by using the code: pip install constants, but it is giving me the following error. How can I solve this?
Collecting constants
Using cached constants-0.6.0.tar.gz (5.1 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\programdata\anaconda3\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Acer\\AppData\\Local\\Temp\\pip-install-8q6whmz2\\constants_749780bf3e3d48df891ec8917b4fea70\\setup.py'"'"'; __file__='"'"'C:\\Users\\Acer\\AppData\\Local\\Temp\\pip-install-8q6whmz2\\constants_749780bf3e3d48df891ec8917b4fea70\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Acer\AppData\Local\Temp\pip-pip-egg-info-xsl2get2'
cwd: C:\Users\Acer\AppData\Local\Temp\pip-install-8q6whmz2\constants_749780bf3e3d48df891ec8917b4fea70\
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\programdata\anaconda3\lib\site-packages\setuptools\__init__.py", line 12, in <module>
from setuptools.extension import Extension
File "c:\programdata\anaconda3\lib\site-packages\setuptools\extension.py", line 7, in <module>
from setuptools.dist import _get_unpatched
File "c:\programdata\anaconda3\lib\site-packages\setuptools\dist.py", line 16, in <module>
import pkg_resources
File "c:\programdata\anaconda3\lib\site-packages\pkg_resources.py", line 1479, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2b/70/74db98e155407b11c446faaf4886830e2119425c786fbd5208397becbb16/constants-0.6.0.tar.gz#sha256=0b65d6927b66bfbefdfbca9ef4d66645d266e7ae148ff91659b76f4c7f9bf9b1 (from https://pypi.org/simple/constants/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached constants-0.5.0.tar.gz (5.0 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\programdata\anaconda3\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Acer\\AppData\\Local\\Temp\\pip-install-8q6whmz2\\constants_e9755947b7b84c938b55fea4c7123afc\\setup.py'"'"'; __file__='"'"'C:\\Users\\Acer\\AppData\\Local\\Temp\\pip-install-8q6whmz2\\constants_e9755947b7b84c938b55fea4c7123afc\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Acer\AppData\Local\Temp\pip-pip-egg-info-0m1muzzg'
cwd: C:\Users\Acer\AppData\Local\Temp\pip-install-8q6whmz2\constants_e9755947b7b84c938b55fea4c7123afc\
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\programdata\anaconda3\lib\site-packages\setuptools\__init__.py", line 12, in <module>
from setuptools.extension import Extension
File "c:\programdata\anaconda3\lib\site-packages\setuptools\extension.py", line 7, in <module>
from setuptools.dist import _get_unpatched
File "c:\programdata\anaconda3\lib\site-packages\setuptools\dist.py", line 16, in <module>
import pkg_resources
File "c:\programdata\anaconda3\lib\site-packages\pkg_resources.py", line 1479, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------