pylint3 and pip3 broken
up vote
0
down vote
favorite
I have tried sudo apt remove --purge
on various packages. I get the same when I reinstall.
I have also tried reinstall using aptitude. This does not work.
My current workaround is to run pylint3 as root, which works, but is bad practice.
pip3
$ pip3
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 33, in vendored
__import__(vendored_name, globals(), locals(), level=0)
ImportError: No module named 'pip._vendor.pkg_resources'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 13, in <module>
from pip.exceptions import InstallationError, CommandError, PipError
File "/usr/lib/python3/dist-packages/pip/exceptions.py", line 6, in <module>
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 75, in <module>
vendored("pkg_resources")
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2927, in <module>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2913, in _call_aside
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 956, in subscribe
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2952, in <lambda>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2515, in activate
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2097, in declare_namespace
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2047, in _handle_ns
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
AttributeError: '_NamespacePath' object has no attribute 'sort'
pylint3
$ pylint3
Traceback (most recent call last):
File "/usr/bin/pylint3", line 3, in <module>
run_pylint()
File "/usr/lib/python3/dist-packages/pylint/__init__.py", line 22, in run_pylint
from pylint.lint import Run
File "/usr/lib/python3/dist-packages/pylint/lint.py", line 44, in <module>
import astroid
File "/usr/lib/python3/dist-packages/astroid/__init__.py", line 54, in <module>
from astroid.nodes import *
File "/usr/lib/python3/dist-packages/astroid/nodes.py", line 54, in <module>
from astroid.scoped_nodes import (
File "/usr/lib/python3/dist-packages/astroid/scoped_nodes.py", line 35, in <module>
from astroid import manager
File "/usr/lib/python3/dist-packages/astroid/manager.py", line 29, in <module>
from astroid import modutils
File "/usr/lib/python3/dist-packages/astroid/modutils.py", line 40, in <module>
import pkg_resources
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
@_call_aside
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 956, in subscribe
callback(dist)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2515, in activate
declare_namespace(pkg)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2097, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2047, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
update
This fixed it.sudo apt remove --purge python3-setuptools
I would love to understand how.
update update
I re-installed dependencies that I need. Then the problem cam back.
@Kenavera I am at the newest python3-tools from the repo (according to synaptic python3-tools 20.7.0-1, which seems quite old).
running python3 as me, as pylint3 at root is working. I still would like a better solution.
apt python python3
add a comment |Â
up vote
0
down vote
favorite
I have tried sudo apt remove --purge
on various packages. I get the same when I reinstall.
I have also tried reinstall using aptitude. This does not work.
My current workaround is to run pylint3 as root, which works, but is bad practice.
pip3
$ pip3
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 33, in vendored
__import__(vendored_name, globals(), locals(), level=0)
ImportError: No module named 'pip._vendor.pkg_resources'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 13, in <module>
from pip.exceptions import InstallationError, CommandError, PipError
File "/usr/lib/python3/dist-packages/pip/exceptions.py", line 6, in <module>
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 75, in <module>
vendored("pkg_resources")
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2927, in <module>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2913, in _call_aside
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 956, in subscribe
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2952, in <lambda>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2515, in activate
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2097, in declare_namespace
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2047, in _handle_ns
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
AttributeError: '_NamespacePath' object has no attribute 'sort'
pylint3
$ pylint3
Traceback (most recent call last):
File "/usr/bin/pylint3", line 3, in <module>
run_pylint()
File "/usr/lib/python3/dist-packages/pylint/__init__.py", line 22, in run_pylint
from pylint.lint import Run
File "/usr/lib/python3/dist-packages/pylint/lint.py", line 44, in <module>
import astroid
File "/usr/lib/python3/dist-packages/astroid/__init__.py", line 54, in <module>
from astroid.nodes import *
File "/usr/lib/python3/dist-packages/astroid/nodes.py", line 54, in <module>
from astroid.scoped_nodes import (
File "/usr/lib/python3/dist-packages/astroid/scoped_nodes.py", line 35, in <module>
from astroid import manager
File "/usr/lib/python3/dist-packages/astroid/manager.py", line 29, in <module>
from astroid import modutils
File "/usr/lib/python3/dist-packages/astroid/modutils.py", line 40, in <module>
import pkg_resources
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
@_call_aside
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 956, in subscribe
callback(dist)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2515, in activate
declare_namespace(pkg)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2097, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2047, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
update
This fixed it.sudo apt remove --purge python3-setuptools
I would love to understand how.
update update
I re-installed dependencies that I need. Then the problem cam back.
@Kenavera I am at the newest python3-tools from the repo (according to synaptic python3-tools 20.7.0-1, which seems quite old).
running python3 as me, as pylint3 at root is working. I still would like a better solution.
apt python python3
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have tried sudo apt remove --purge
on various packages. I get the same when I reinstall.
I have also tried reinstall using aptitude. This does not work.
My current workaround is to run pylint3 as root, which works, but is bad practice.
pip3
$ pip3
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 33, in vendored
__import__(vendored_name, globals(), locals(), level=0)
ImportError: No module named 'pip._vendor.pkg_resources'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 13, in <module>
from pip.exceptions import InstallationError, CommandError, PipError
File "/usr/lib/python3/dist-packages/pip/exceptions.py", line 6, in <module>
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 75, in <module>
vendored("pkg_resources")
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2927, in <module>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2913, in _call_aside
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 956, in subscribe
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2952, in <lambda>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2515, in activate
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2097, in declare_namespace
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2047, in _handle_ns
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
AttributeError: '_NamespacePath' object has no attribute 'sort'
pylint3
$ pylint3
Traceback (most recent call last):
File "/usr/bin/pylint3", line 3, in <module>
run_pylint()
File "/usr/lib/python3/dist-packages/pylint/__init__.py", line 22, in run_pylint
from pylint.lint import Run
File "/usr/lib/python3/dist-packages/pylint/lint.py", line 44, in <module>
import astroid
File "/usr/lib/python3/dist-packages/astroid/__init__.py", line 54, in <module>
from astroid.nodes import *
File "/usr/lib/python3/dist-packages/astroid/nodes.py", line 54, in <module>
from astroid.scoped_nodes import (
File "/usr/lib/python3/dist-packages/astroid/scoped_nodes.py", line 35, in <module>
from astroid import manager
File "/usr/lib/python3/dist-packages/astroid/manager.py", line 29, in <module>
from astroid import modutils
File "/usr/lib/python3/dist-packages/astroid/modutils.py", line 40, in <module>
import pkg_resources
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
@_call_aside
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 956, in subscribe
callback(dist)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2515, in activate
declare_namespace(pkg)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2097, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2047, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
update
This fixed it.sudo apt remove --purge python3-setuptools
I would love to understand how.
update update
I re-installed dependencies that I need. Then the problem cam back.
@Kenavera I am at the newest python3-tools from the repo (according to synaptic python3-tools 20.7.0-1, which seems quite old).
running python3 as me, as pylint3 at root is working. I still would like a better solution.
apt python python3
I have tried sudo apt remove --purge
on various packages. I get the same when I reinstall.
I have also tried reinstall using aptitude. This does not work.
My current workaround is to run pylint3 as root, which works, but is bad practice.
pip3
$ pip3
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 33, in vendored
__import__(vendored_name, globals(), locals(), level=0)
ImportError: No module named 'pip._vendor.pkg_resources'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 13, in <module>
from pip.exceptions import InstallationError, CommandError, PipError
File "/usr/lib/python3/dist-packages/pip/exceptions.py", line 6, in <module>
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 75, in <module>
vendored("pkg_resources")
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2927, in <module>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2913, in _call_aside
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 956, in subscribe
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2952, in <lambda>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2515, in activate
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2097, in declare_namespace
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2047, in _handle_ns
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
AttributeError: '_NamespacePath' object has no attribute 'sort'
pylint3
$ pylint3
Traceback (most recent call last):
File "/usr/bin/pylint3", line 3, in <module>
run_pylint()
File "/usr/lib/python3/dist-packages/pylint/__init__.py", line 22, in run_pylint
from pylint.lint import Run
File "/usr/lib/python3/dist-packages/pylint/lint.py", line 44, in <module>
import astroid
File "/usr/lib/python3/dist-packages/astroid/__init__.py", line 54, in <module>
from astroid.nodes import *
File "/usr/lib/python3/dist-packages/astroid/nodes.py", line 54, in <module>
from astroid.scoped_nodes import (
File "/usr/lib/python3/dist-packages/astroid/scoped_nodes.py", line 35, in <module>
from astroid import manager
File "/usr/lib/python3/dist-packages/astroid/manager.py", line 29, in <module>
from astroid import modutils
File "/usr/lib/python3/dist-packages/astroid/modutils.py", line 40, in <module>
import pkg_resources
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
@_call_aside
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 956, in subscribe
callback(dist)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2952, in <lambda>
add_activation_listener(lambda dist: dist.activate())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2515, in activate
declare_namespace(pkg)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2097, in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2047, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2066, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
update
This fixed it.sudo apt remove --purge python3-setuptools
I would love to understand how.
update update
I re-installed dependencies that I need. Then the problem cam back.
@Kenavera I am at the newest python3-tools from the repo (according to synaptic python3-tools 20.7.0-1, which seems quite old).
running python3 as me, as pylint3 at root is working. I still would like a better solution.
apt python python3
apt python python3
edited Feb 24 at 12:35
asked Feb 24 at 9:16
ColonelFazackerley
1214
1214
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
sudo apt-get upgrade python-setuptools
did the trick for me. Hope this helps you too.
1
Nice too see you have solved it. I found my source after your follow up question in: github.com/pypa/pip/issues/4216 There it is stated that:... the problem arose when Setuptools 31 introduced support for setup.py develop on namespace packages, which required the expansion of -nspkg.pth files. This change essentially meant that older versions of pkg_resources didn't support this new format and would choke.
and this seems to be also applicable to your command.
â Kenavera
Feb 24 at 9:26
add a comment |Â
up vote
0
down vote
accepted
Clean up python installation
Restore Python installation to default plus apt package dependencies
list all things manually installed via apt:
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
remove pylint3 and all python3-*. For me this was:
sudo apt remove pylint3 python3-googleapi python3-lxml python3-matplotlib python3-numpy python3-pip python3-pyocr python3-scipy python3-tk python-lxml python-numpy python-pip python-setuptools
sudo apt autoremove
list things installed via pip ls -ltd /usr/local/lib/python3.5/dist-packages/*
remove them
pip3 uninstall setuptools
pip3 uninstall pydicom
pip3 uninstall docx
lastly pip itself
pip3 uninstall pip
delete everything installed for the user by deleting all from here
'$HOME/.local/lib/python*'
Reinstall
sudo apt install python3-pip pylint3 python3-venv
Set up virtual environment
I have a project called plan-report. in that directory (not as root)
python3 -m venv plan-report-env
chmod +x ./plan-report-env/bin/activate
# this line needs repeating each time a terminal is opened
./plan-report-env/bin/activate
reinstall python packages in the virtual environment. eg
pip install numpy
Note that it was python3 that created the venv, so now you just say pip
, not pip3
. seems ok to upgrade pip within the venv too.
pip install --upgrade pip
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
sudo apt-get upgrade python-setuptools
did the trick for me. Hope this helps you too.
1
Nice too see you have solved it. I found my source after your follow up question in: github.com/pypa/pip/issues/4216 There it is stated that:... the problem arose when Setuptools 31 introduced support for setup.py develop on namespace packages, which required the expansion of -nspkg.pth files. This change essentially meant that older versions of pkg_resources didn't support this new format and would choke.
and this seems to be also applicable to your command.
â Kenavera
Feb 24 at 9:26
add a comment |Â
up vote
0
down vote
sudo apt-get upgrade python-setuptools
did the trick for me. Hope this helps you too.
1
Nice too see you have solved it. I found my source after your follow up question in: github.com/pypa/pip/issues/4216 There it is stated that:... the problem arose when Setuptools 31 introduced support for setup.py develop on namespace packages, which required the expansion of -nspkg.pth files. This change essentially meant that older versions of pkg_resources didn't support this new format and would choke.
and this seems to be also applicable to your command.
â Kenavera
Feb 24 at 9:26
add a comment |Â
up vote
0
down vote
up vote
0
down vote
sudo apt-get upgrade python-setuptools
did the trick for me. Hope this helps you too.
sudo apt-get upgrade python-setuptools
did the trick for me. Hope this helps you too.
answered Feb 24 at 9:21
Kenavera
1
1
1
Nice too see you have solved it. I found my source after your follow up question in: github.com/pypa/pip/issues/4216 There it is stated that:... the problem arose when Setuptools 31 introduced support for setup.py develop on namespace packages, which required the expansion of -nspkg.pth files. This change essentially meant that older versions of pkg_resources didn't support this new format and would choke.
and this seems to be also applicable to your command.
â Kenavera
Feb 24 at 9:26
add a comment |Â
1
Nice too see you have solved it. I found my source after your follow up question in: github.com/pypa/pip/issues/4216 There it is stated that:... the problem arose when Setuptools 31 introduced support for setup.py develop on namespace packages, which required the expansion of -nspkg.pth files. This change essentially meant that older versions of pkg_resources didn't support this new format and would choke.
and this seems to be also applicable to your command.
â Kenavera
Feb 24 at 9:26
1
1
Nice too see you have solved it. I found my source after your follow up question in: github.com/pypa/pip/issues/4216 There it is stated that:
... the problem arose when Setuptools 31 introduced support for setup.py develop on namespace packages, which required the expansion of -nspkg.pth files. This change essentially meant that older versions of pkg_resources didn't support this new format and would choke.
and this seems to be also applicable to your command.â Kenavera
Feb 24 at 9:26
Nice too see you have solved it. I found my source after your follow up question in: github.com/pypa/pip/issues/4216 There it is stated that:
... the problem arose when Setuptools 31 introduced support for setup.py develop on namespace packages, which required the expansion of -nspkg.pth files. This change essentially meant that older versions of pkg_resources didn't support this new format and would choke.
and this seems to be also applicable to your command.â Kenavera
Feb 24 at 9:26
add a comment |Â
up vote
0
down vote
accepted
Clean up python installation
Restore Python installation to default plus apt package dependencies
list all things manually installed via apt:
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
remove pylint3 and all python3-*. For me this was:
sudo apt remove pylint3 python3-googleapi python3-lxml python3-matplotlib python3-numpy python3-pip python3-pyocr python3-scipy python3-tk python-lxml python-numpy python-pip python-setuptools
sudo apt autoremove
list things installed via pip ls -ltd /usr/local/lib/python3.5/dist-packages/*
remove them
pip3 uninstall setuptools
pip3 uninstall pydicom
pip3 uninstall docx
lastly pip itself
pip3 uninstall pip
delete everything installed for the user by deleting all from here
'$HOME/.local/lib/python*'
Reinstall
sudo apt install python3-pip pylint3 python3-venv
Set up virtual environment
I have a project called plan-report. in that directory (not as root)
python3 -m venv plan-report-env
chmod +x ./plan-report-env/bin/activate
# this line needs repeating each time a terminal is opened
./plan-report-env/bin/activate
reinstall python packages in the virtual environment. eg
pip install numpy
Note that it was python3 that created the venv, so now you just say pip
, not pip3
. seems ok to upgrade pip within the venv too.
pip install --upgrade pip
add a comment |Â
up vote
0
down vote
accepted
Clean up python installation
Restore Python installation to default plus apt package dependencies
list all things manually installed via apt:
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
remove pylint3 and all python3-*. For me this was:
sudo apt remove pylint3 python3-googleapi python3-lxml python3-matplotlib python3-numpy python3-pip python3-pyocr python3-scipy python3-tk python-lxml python-numpy python-pip python-setuptools
sudo apt autoremove
list things installed via pip ls -ltd /usr/local/lib/python3.5/dist-packages/*
remove them
pip3 uninstall setuptools
pip3 uninstall pydicom
pip3 uninstall docx
lastly pip itself
pip3 uninstall pip
delete everything installed for the user by deleting all from here
'$HOME/.local/lib/python*'
Reinstall
sudo apt install python3-pip pylint3 python3-venv
Set up virtual environment
I have a project called plan-report. in that directory (not as root)
python3 -m venv plan-report-env
chmod +x ./plan-report-env/bin/activate
# this line needs repeating each time a terminal is opened
./plan-report-env/bin/activate
reinstall python packages in the virtual environment. eg
pip install numpy
Note that it was python3 that created the venv, so now you just say pip
, not pip3
. seems ok to upgrade pip within the venv too.
pip install --upgrade pip
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Clean up python installation
Restore Python installation to default plus apt package dependencies
list all things manually installed via apt:
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
remove pylint3 and all python3-*. For me this was:
sudo apt remove pylint3 python3-googleapi python3-lxml python3-matplotlib python3-numpy python3-pip python3-pyocr python3-scipy python3-tk python-lxml python-numpy python-pip python-setuptools
sudo apt autoremove
list things installed via pip ls -ltd /usr/local/lib/python3.5/dist-packages/*
remove them
pip3 uninstall setuptools
pip3 uninstall pydicom
pip3 uninstall docx
lastly pip itself
pip3 uninstall pip
delete everything installed for the user by deleting all from here
'$HOME/.local/lib/python*'
Reinstall
sudo apt install python3-pip pylint3 python3-venv
Set up virtual environment
I have a project called plan-report. in that directory (not as root)
python3 -m venv plan-report-env
chmod +x ./plan-report-env/bin/activate
# this line needs repeating each time a terminal is opened
./plan-report-env/bin/activate
reinstall python packages in the virtual environment. eg
pip install numpy
Note that it was python3 that created the venv, so now you just say pip
, not pip3
. seems ok to upgrade pip within the venv too.
pip install --upgrade pip
Clean up python installation
Restore Python installation to default plus apt package dependencies
list all things manually installed via apt:
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
remove pylint3 and all python3-*. For me this was:
sudo apt remove pylint3 python3-googleapi python3-lxml python3-matplotlib python3-numpy python3-pip python3-pyocr python3-scipy python3-tk python-lxml python-numpy python-pip python-setuptools
sudo apt autoremove
list things installed via pip ls -ltd /usr/local/lib/python3.5/dist-packages/*
remove them
pip3 uninstall setuptools
pip3 uninstall pydicom
pip3 uninstall docx
lastly pip itself
pip3 uninstall pip
delete everything installed for the user by deleting all from here
'$HOME/.local/lib/python*'
Reinstall
sudo apt install python3-pip pylint3 python3-venv
Set up virtual environment
I have a project called plan-report. in that directory (not as root)
python3 -m venv plan-report-env
chmod +x ./plan-report-env/bin/activate
# this line needs repeating each time a terminal is opened
./plan-report-env/bin/activate
reinstall python packages in the virtual environment. eg
pip install numpy
Note that it was python3 that created the venv, so now you just say pip
, not pip3
. seems ok to upgrade pip within the venv too.
pip install --upgrade pip
answered Apr 15 at 6:48
ColonelFazackerley
1214
1214
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1009266%2fpylint3-and-pip3-broken%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password