Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install psutil 5.6.6 on windows 11/ python 3.10.13 #1393

Closed
ea1442 opened this issue Aug 11, 2024 · 3 comments
Closed

Cannot install psutil 5.6.6 on windows 11/ python 3.10.13 #1393

ea1442 opened this issue Aug 11, 2024 · 3 comments

Comments

@ea1442
Copy link

ea1442 commented Aug 11, 2024

Hello,

I am trying to install the latest version of pysystemtrade on Windows using a virtual environment set up with Anaconda. I remember running older versions of pysystemtrade without any issues (using Python 3.8.x). However, on Python 3.10.x, I am unable to install psutil version 5.6.6; only 5.6.7 or newer versions are available. When I try to use version 5.6.7 or newer, the pysystemtrade setup returns an error.

I have tried installing several different versions of Microsoft Visual C++ 14.0 or higher, but the result remains the same.

Here’s the error output:

**psutil/_psutil_windows.c(272): error C2094: label 'error' was undefined
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psutil
Running setup.py clean for psutil
Failed to build psutil
ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects**

I have searched online about installing psutil 5.6.6 and found that it seems to be impossible for many users. It is often suggested to install version 5.6.7 instead (ref: EGA-archive/ega-download-client#205).

How did you manage to run the latest version on Windows with Python 3.10.x or newer?
What is the correct setup I should follow?

Thank you for the help.

@Spacious08
Copy link

Spacious08 commented Aug 11, 2024

I got similar issue.
I finally used psutil==6.0.0 and downloaded the wheel somewhere I dont remember since I wasn't able to build it. I think it was at this link : https://pypi.org/project/psutil/6.0.0/#files

@ea1442
Copy link
Author

ea1442 commented Aug 11, 2024

How did you have PST proceed further with psutil==6.0.0 ? setup.py just interrupts when 5.6.6 is not detected.

@ea1442
Copy link
Author

ea1442 commented Aug 11, 2024

I installed after modifying setup.py
Looks like it worked for now. Hope this helps other people having the same issue.

Here is what I did in setup.py:
Commented out lines 80 and 81 as follows:

#license="GNU GPL v3",
#keywords="systematic trading interactive brokers",

Changed line 94
from "psutil==5.6.6"
to "psutil>=5.6.6"

@ea1442 ea1442 closed this as completed Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants