Closed Max-Ole closed 2 weeks ago
I was able to install scipy now by running the steps below. I had success on a different computer where I didn't use special characters and hadn't tried the installation before. With these steps it then also worked on the original computer:
--no-cache-dir
)Note that this time there was no mention of "Preparing metadata". This might not have fixed but just skipped the meson steps.
C:\Users\maxol\Desktop\MasterThese_venv>pyenv versions
3.11.0b4-win32
C:\Users\maxol\Desktop\MasterThese_venv>pyenv local 3.11.0b4-win32
C:\Users\maxol\Desktop\MasterThese_venv>pyenv local
3.11.0b4-win32
C:\Users\maxol\Desktop\MasterThese_venv>python -m venv thesis_venv
C:\Users\maxol\Desktop\MasterThese_venv>thesis_venv\Scripts\activate
(thesis_venv) C:\Users\maxol\Desktop\MasterThese_venv>pip list
Package Version
---------- -------
pip 23.2.1
setuptools 65.5.0
[notice] A new release of pip is available: 23.2.1 -> 24.0
[notice] To update, run: python.exe -m pip install --upgrade pip
(thesis_venv) C:\Users\maxol\Desktop\MasterThese_venv>python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in c:\users\maxol\desktop\masterthese_venv\thesis_venv\lib\site-packages (23.2.1)
Collecting pip
Obtaining dependency information for pip from https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl.metadata
Using cached pip-24.0-py3-none-any.whl.metadata (3.6 kB)
Using cached pip-24.0-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 23.2.1
Uninstalling pip-23.2.1:
Successfully uninstalled pip-23.2.1
Successfully installed pip-24.0
(thesis_venv) C:\Users\maxol\Desktop\MasterThese_venv>pip install scipy --no-cache-dir
Collecting scipy
Downloading scipy-1.13.0-cp311-cp311-win_amd64.whl.metadata (60 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.6/60.6 kB 645.4 kB/s eta 0:00:00
Collecting numpy<2.3,>=1.22.4 (from scipy)
Downloading numpy-1.26.4-cp311-cp311-win_amd64.whl.metadata (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.0/61.0 kB ? eta 0:00:00
Downloading scipy-1.13.0-cp311-cp311-win_amd64.whl (46.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.2/46.2 MB 7.0 MB/s eta 0:00:00
Downloading numpy-1.26.4-cp311-cp311-win_amd64.whl (15.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.8/15.8 MB 7.0 MB/s eta 0:00:00
Installing collected packages: numpy, scipy
Successfully installed numpy-1.26.4 scipy-1.13.0
(thesis_venv) C:\Users\maxol\Desktop\MasterThese_venv>
I find it odd that your first installation attempt resulted in pip trying to build scipy from source, but not the second.
Anyhow, there is a bug in meson-python where we write the native file with the wrong encoding. Fix waiting in https://github.com/mesonbuild/meson-python/pull/623
I noticed that even in a fresh venv, pip cache list
shows wheels that I used elsewhere on the computer. Running it now I don't see anything related to scipy in the cache, but just maybe the --no-cache-dir
option made the change.
Anyway, it's working and thanks for the fix!
Hi all,
I'm on Windows 11 and I have set up a fresh Python 3.11 virtual environment and used pip to install ultralytics. This in turn installs scipy, which results in the UnicodeDecodeError error:
This seems to happen together with a failure of metadata generation with a file called
pyproject.toml
. Note that my working directory path contains non-ascii characters, if that is of any use.To Reproduce:
I created a new venv:
pyenv local 3.11.0b4
python3 -m venv myPyEnv
I activated the venv with a .bat script containing:cmd /k "cd /d myPyEnv\Scripts && activate.bat && cd ..\.."
Then I ran:pip install ultralytics
Terminal output: