1
votes

I have tried to install django channels using this command.

pip install -U channels

but am getting this error

Downloading/unpacking channels Downloading channels-2.0.2-py2.py3-none-any.whl Cleaning up... Exception: Traceback (most recent call last): File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2482, in _dep_map return self.dep_map File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2344, in __getattr raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/praneet/pral/myvenv/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/home/praneet/pral/myvenv/lib/python3.4/site-packages/pip/commands/install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/home/praneet/pral/myvenv/lib/python3.4/site-packages/pip/req.py", line 1266, in prepare_files req_to_install.extras): File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2291, in requires dm = self._dep_map File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2484, in _dep_map self.__dep_map = self._compute_dependencies() File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2508, in _compute_dependencies parsed = next(parse_requirements(distvers)) File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2605, in parse_requirements line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec") File "/home/praneet/pral/myvenv/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2573, in scan_list raise ValueError("Expected "+item_name+" in",line,"at",line[p:]) ValueError: ('Expected version spec in', 'asgiref ~=2.1', 'at', ' ~=2.1')

Storing debug log for failure in /home/praneet/.pip/pip.log

1
I am installing first time the channelsalka kumari
What's your pip version? Please upgrade your pip version.Raja Simon
This is the problem with pkg_resources. Please upgrade your pip sudo pip3 install --upgrade pip Let me know if this works ?Raja Simon
WHat should be included in installed apps for django-channelsalka kumari
Waitaminute are you saying is that solution worked and now you are having another question ?Raja Simon

1 Answers

1
votes

I was also stuck with same issue.

Now,I have fixed it by installing following packages:

python2

sudo apt-get install python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev

python3

sudo apt-get install python3-dev python3-pip libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev