AllenDowney / ModSimPy

Text and supporting code for Modeling and Simulation in Python
https://allendowney.github.io/ModSimPy/
MIT License
823 stars 1.76k forks source link

Can't pip install modsimpy - Error Message #53

Closed bradynichols closed 4 years ago

bradynichols commented 4 years ago

Hey,

I'm trying to begin this book and when following the requirements it says to do pip install modsimpy. When I try to do so, it gives me a really long error message:

ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Brady\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Brady\\AppData\\Local\\Temp\\pip-install-426xujgr\\modsimpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\Brady\\AppData\\Local\\Temp\\pip-install-426xujgr\\modsimpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\Brady\AppData\Local\Temp\pip-install-426xujgr\modsimpy\
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Brady\AppData\Local\Temp\pip-install-426xujgr\modsimpy\setup.py", line 20, in <module>
        long_description=readme(),
      File "C:\Users\Brady\AppData\Local\Temp\pip-install-426xujgr\modsimpy\setup.py", line 6, in readme
        return f.read()
      File "C:\Users\Brady\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
        return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 4990: character maps to <undefined>
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I have verified that I can install other packages with pip and I tried reinstalling pip using conda as well as restarting my computer.

How can I fix this? Or is there an alternate way of installing modsimpy now? Thanks!

AllenDowney commented 4 years ago

Confirmed. The problem is that there are Unicode characters in README.rst. I am fixing it now...

bradynichols commented 4 years ago

Update: I was able to pip install modsimpy by enabling the beta UTF-8 encoding option in Windows 10 as noted here.

Thank you! I'll leave this open in case you do fix the original issue.

AllenDowney commented 4 years ago

Good to know.

I just push an update to PyPI. I think it will resolve the issue, but if you are able to test it, please let me know.

Thanks!

On Sun, Oct 20, 2019, at 10:42 PM, Brady Nichols wrote:

Update: I was able to pip install modsimpy by enabling the beta UTF-8 encoding option in Windows 10 as noted here https://superuser.com/questions/1033088/is-it-possible-to-set-locale-of-a-windows-application-to-utf-8.

Thank you! I'll leave this open in case you do fix the original issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AllenDowney/ModSimPy/issues/53?email_source=notifications&email_token=AAOLP3MOMED26FWYX3QJKK3QPUJK5A5CNFSM4JCN6AR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBY4MQY#issuecomment-544327235, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOLP3PJ7DPH6WCWLWCJUXDQPUJK5ANCNFSM4JCN6ARQ.