se2p / pynguin

The PYthoN General UnIt Test geNerator is a test-generation tool for Python
https://www.pynguin.eu
MIT License
1.22k stars 74 forks source link

install pynguin error - with astmonkey #50

Closed tatwww closed 8 months ago

tatwww commented 8 months ago

Hello, I encountered a problem when installing Collecting astmonkey>=0.3.6 Using cached astmonkey-0.3.6.tar.gz (10 kB)

[6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\wTat\AppData\Local\Temp\pip-install-s2zp1fpl\astmonkey_176ba39be03b487bbbf28bea3f7c3b7e\setup.py", line 7, in long_description = f.read() UnicodeDecodeError: 'cp950' codec can't decode byte 0xc5 in position 3079: illegal multibyte sequence [end of output]

Please tell me how to deal with and solve it?

image

stephanlukasczyk commented 8 months ago

From what I understand from the error message and looking into astmonkey's setup.py: this is a problem, the Pynguin developers cannot do anything for you. It's a problem between your Windows system and the setup.py provided by astmonkey (which is executed to install that package, a dependency of Pynguin). Windows assumes the file to be encoded with the cp950 encoding (which is traditional Chinese, from what an internet search tells me); the setup.py seems to contain some Unicode characters, probably in UTF-8 encoding. Windows seems to fail to use the correct decoder, which causes this error.

I don't know anything about Windows, probably one can change some settings there. Alternatively, ask the astmonkey developers for advice, or try to install Pynguin on a proper operating system, i.e., Linux/macOS/BSD/... These days, Windows provides some Linux subsystem, which seems like a natural choice, although I don't know about that, either. I've only heard from users that installing Pynguin in that Linux subsystem works.