You are not logged in.
I install virtualenv and pip by:
pacman -S python-virtualenv python-pipWhen running both tools, I get error of the same structure:
$ pip --version
Traceback (most recent call last):
File "/usr/bin/pip", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3095, in <module>
@_call_aside
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3079, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 888, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==18.0' distribution was not found and is required by the application$ virtualenv --version
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3095, in <module>
@_call_aside
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3079, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 570, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 888, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'virtualenv==16.0.0' distribution was not found and is required by the applicationCan't work out what's the reason, nor how to fix it. Can somebody help?
Last edited by no-cheating (2018-08-30 13:57:11)
Offline
Looks like a partial upgrade.
EDIT: confirmed in the archive, you could not have pip 18 and python 3.6 unless you were doing partial upgrades. Upgrade your system.
https://bbs.archlinux.org/viewtopic.php?id=130309
Last edited by Trilby (2018-08-30 13:50:24)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Looks like a partial upgrade.
EDIT: confirmed in the archive, you could not have pip 18 and python 3.6 unless you were doing partial upgrades. Upgrade your system.
True. I installed python-pip and python-virtualenv packages, but haven't updated the main python package. Now that I've done it, everything works fine. Thanks.
Last edited by no-cheating (2018-08-30 13:56:59)
Offline
Note that this would not have happened if you were not also doing partial upgrades which you should never do.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
What do you mean? If I do:
pacman -S <package>And that package is already installed, is that a partial upgrade?
Offline
If you've updated the databases without updating the entire system, yes.
Offline
So I should always check, if the package I'm installing has been already installed (cause pacman doesn't signal the difference between install and upgrade) and if it has and I want to upgrade it, I should upgrade the whole system. Do I get it right?
Offline
https://wiki.archlinux.org/index.php/Sy … nsupported
Using `pacman -S <package>` should never be unsafe. The worst that could happen if you haven't updated in a while is that you will get a 404 response due to the package version in your local database no longer being available on the mirrors.
The problem comes from any use of `pacman -Sy` (other than `pacman -Syu`) as that updates your local databases, but doesn't update the packages. So any future package installations will get a version that wasn't intended to be beside the other packages you have installed. Incidentally, you can also get into a similar situation of you attempt a `pacman -Syu` but then Ctrl-C or otherwise cancel it before it finishes, and then subsequently don't bother completing the update.
EDIT:
So I should always check, if the package I'm installing has been already installed
No, that's really not relevant. Just never run `pacman -Sy` and you will not have this sort of problem. It is good practice to update regularly, and some archers suggest you should update every time you are installing new packages - but neither of those steps are actually necessary to avoid partial upgrades. The only thing needed to avoid partial ugrades is to not do silly pointless things like `pacman -Sy`.
Last edited by Trilby (2018-08-30 14:12:37)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
https://wiki.archlinux.org/index.php/Sy … nsupported
Using `pacman -S <package>` should never be unsafe. The worst that could happen if you haven't updated in a while is that you will get a 404 response due to the package version in your local database no longer being available on the mirrors.
The problem comes from any use of `pacman -Sy` (other than `pacman -Syu`) as that updates your local databases, but doesn't update the packages. So any future package installations will get a version that wasn't intended to be beside the other packages you have installed. Incidentally, you can also get into a similar situation of you attempt a `pacman -Syu` but then Ctrl-C or otherwise cancel it before it finishes, and then subsequently don't bother completing the update.
EDIT:
no-cheating wrote:So I should always check, if the package I'm installing has been already installed
No, that's really not relevant. Just never run `pacman -Sy` and you will not have this sort of problem. It is good practice to update regularly, and some archers suggest you should update every time you are installing new packages - but neither of those steps are actually necessary to avoid partial upgrades. The only thing needed to avoid partial ugrades is to not do silly pointless things like `pacman -Sy`.
Finally I get it. Thanks for the detailed explanation.
And yeah, I've done pacman -Syy today after I started getting some errors of being unable to download the package I wanted to install. Now I know I shouldn't have done that.
And as for the updates, I try to update the whole system once a week.
Last edited by no-cheating (2018-08-30 14:15:55)
Offline
I'd encourage you to update more frequently. But if you do continue to update at longer intervals, just note that the next time you try to install a new package and get a similar 404 error, the correct solution is then to `pacman -Syu <packagename>`.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
And as for the updates, I try to update the whole system once a week.
Try harder. Python was updated to 3.7 in Extra three and a half weeks ago.
Offline
no-cheating wrote:And as for the updates, I try to update the whole system once a week.
Try harder. Python was updated to 3.7 in Extra three and a half weeks ago.
Okay, I will
.
Offline
Slightly off-topic, but OP you generally don't need to install either of those packages anyhow because you can create a virtual env and install via pip using standard python since at least python 3.4:
python -m venv env
env/bin/pip install <whatever>I often throw the following line between the 2 above just to ensure I use the latest pip in that venv:
env/bin/pip install -U pipOffline