pleiszenburg / wenv

Running Python on Wine
GNU Lesser General Public License v2.1
19 stars 1 forks source link

Unknown command or script: "pip" #27

Open Openuser87 opened 2 months ago

Openuser87 commented 2 months ago

Trying to set up wenv on Fedora 39, wine 9.1.

Installation seems to run well:

$ WENV_PYTHONVERSION=3.12.4 wenv init
wine: configuration in L"/home/<user>/.local/share/wenv/win32" has been updated.
Collecting pip
  Downloading pip-24.1.2-py3-none-any.whl.metadata (3.6 kB)
Collecting setuptools
  Downloading setuptools-70.3.0-py3-none-any.whl.metadata (5.8 kB)
Collecting wheel
  Downloading wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
Downloading pip-24.1.2-py3-none-any.whl (1.8 MB)
   ---------------------------------------- 1.8/1.8 MB 3.8 MB/s eta 0:00:00
Downloading setuptools-70.3.0-py3-none-any.whl (931 kB)
   ---------------------------------------- 931.1/931.1 kB 7.0 MB/s eta 0:00:00
Downloading wheel-0.43.0-py3-none-any.whl (65 kB)
   ---------------------------------------- 65.8/65.8 kB 11.1 MB/s eta 0:00:00
Installing collected packages: wheel, setuptools, pip
Successfully installed pip-24.1.2 setuptools-70.3.0 wheel-0.43.0

But trying to execute a pip command yields:

wenv pip list
Unknown command or script: "pip"

How could this be fixed?

Openuser87 commented 2 months ago

Seems that happens with any version, except for default version 3.7. Also python command itself is not found:

wenv python --version
Unknown command or script: "python"

With default version, wenv init shows an error:

ERROR: This script does not work on Python 3.7. The minimum supported Python version is 3.8. Please use https://bootstrap.pypa.io/pip/3.7/get-pip.py instead.

Nevertheless, after that, python command seems to work:

wenv python --version
Python 3.7.4

But pip does not:

wenv pip list
Unknown command or script: "pip"
s-m-e commented 1 month ago

If you're setting an option via an environment variable the way you do it, every subsequent command must be prefixed with mentioned environment variable, e.g. WENV_PYTHONVERSION=3.12.4 wenv pip install foo. Alternatively, you can of cause alter this option also via configuration files etc.

Openuser87 commented 1 month ago

Thank you, that works!

Ways to persist:

Could this possibly be emphasized a little more in the official documentation?

s-m-e commented 1 month ago

Sure, this can be done.