You are not logged in.

#1 2022-06-30 17:23:50

BrianC
Member
Registered: 2022-02-08
Posts: 16

pip install not finding yaml

I have done pacman -Syu and updated the pip package. When I try to pip install yaml I get

```
ERROR: Could not find a version that satisfies the requirement yaml (from versions: none)
ERROR: No matching distribution found for yaml
```
Can anyone help?

Thanks.

Offline

#2 2022-06-30 17:51:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,306

Re: pip install not finding yaml

The pip package is pyyaml, however if you have no particular and good reason to use pip , what's wrong with: https://archlinux.org/packages/communit … thon-yaml/ ?

Online

#3 2022-06-30 18:15:33

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,313

Re: pip install not finding yaml

To elaborate on V1del: as a very very strong guideline: only run pip inside of a virtualenv (https://wiki.archlinux.org/title/Python … nvironment). pip will collide with packages installed via pacman, which you will not notice until the sh*t hits the fan during an update. My general rule is this: if a Python package is in the repos, install via pacman. If it isn't, or you require a different version, your Python project should be in a virtualenv, and install only those 'oddball' packages via pip inside the virtualenv.

Offline

#4 2022-06-30 18:21:06

BrianC
Member
Registered: 2022-02-08
Posts: 16

Re: pip install not finding yaml

I'm doing it in a conda environment.

Offline

#5 2022-06-30 18:22:57

BrianC
Member
Registered: 2022-02-08
Posts: 16

Re: pip install not finding yaml

V1del wrote:

The pip package is pyyaml, however if you have no particular and good reason to use pip , what's wrong with: https://archlinux.org/packages/communit … thon-yaml/ ?

I had tried that but it returns the same error.

Offline

#6 2022-06-30 18:25:46

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,313

Re: pip install not finding yaml

Post your exact commands, including the pacman one you used to install python-yaml.

Offline

#7 2022-06-30 18:41:50

BrianC
Member
Registered: 2022-02-08
Posts: 16

Re: pip install not finding yaml

```
sudo pacman -Su python-yaml
```
Gives
```
(1/1) checking for file conflicts                  [######################] 100%
error: failed to commit transaction (conflicting files)
python-yaml: /usr/lib/python3.10/site-packages/_yaml/__init__.py exists in filesystem
```
What are the code tags btw?

Offline

#8 2022-06-30 18:51:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,306

Re: pip install not finding yaml

[ code ] [ /code ] without the spaces.

You already did what we feared and you already installed PyYAML  (this would be the correct capitalization btw) with pip once. As already mentioned you are strongly encouraged to not pollute your system environment with pip packages. To properly fix that you should remove the system wide installed yaml with PIP and install python-yaml instead.

Online

#9 2022-06-30 20:58:14

BrianC
Member
Registered: 2022-02-08
Posts: 16

Re: pip install not finding yaml

Gotcha. Thank you.

Offline

Board footer

Powered by FluxBB