peteboyd / lammps_interface

automatic generation of LAMMPS input files for molecular dynamics simulations of MOFs
MIT License
125 stars 63 forks source link

Cannot install lammps-interface by PyPI #49

Closed jiamingl98 closed 3 years ago

jiamingl98 commented 3 years ago

I try to use pip install lammps-interface command but there are some errors.

Collecting lammps-interface Using cached lammps-interface-0.2.1.tar.gz (101 kB) ERROR: Command errored out with exit status 1: command: 'c:\users\li\miniconda3\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\li\AppData\Local\ Temp\pip-install-ej_l3177\lammps-interface_c00043258eb44aaca9a694301619e513\s etup.py'"'"'; file='"'"'C:\Users\li\AppData\Local\Temp\pip-inst all-ej_l3177\lammps-interface_c00043258eb44aaca9a694301619e513\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read ().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\li\AppData\Local\Temp\pip -pip-egg-info-pvps1vjz' cwd: C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps- interface_c00043258eb44aaca9a694301619e513\ Complete output (5 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps-in terface_c00043258eb44aaca9a694301619e513\setup.py", line 24, in long_description=open('README.md').read(), UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 1640: ill egal multibyte sequence

WARNING: Discarding https://files.pythonhosted.org/packages/f5/7a/c14e515bcf5f81 a823814fcc99f14f68ec3fd73e974eabfb5ec9d2f139af/lammps-interface-0.2.1.tar.gz#sha 256=bd2a36bce5ad6ae2bb246526e6b38dc8be11a3372975a6edb070d21392cfa9ac (from https ://pypi.org/simple/lammps-interface/) (requires-python:>=3.6). Command errored o ut with exit status 1: python setup.py egg_info Check the logs for full command output. Using cached lammps-interface-0.2.0.tar.gz (101 kB) ERROR: Command errored out with exit status 1: command: 'c:\users\li\miniconda3\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\li\AppData\Local\ Temp\pip-install-ej_l3177\lammps-interface_fa23a47c3597443a84cf9d9de9d66b35\s etup.py'"'"'; file='"'"'C:\Users\li\AppData\Local\Temp\pip-inst all-ej_l3177\lammps-interface_fa23a47c3597443a84cf9d9de9d66b35\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read ().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\li\AppData\Local\Temp\pip -pip-egg-info-mu7effyi' cwd: C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps- interface_fa23a47c3597443a84cf9d9de9d66b35\ Complete output (5 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps-in terface_fa23a47c3597443a84cf9d9de9d66b35\setup.py", line 24, in long_description=open('README.md').read(), UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 1640: ill egal multibyte sequence

WARNING: Discarding https://files.pythonhosted.org/packages/fb/d9/7fd305737dadcb f9e48a3551250c9468f266a4d0a62842be02871e44c55a/lammps-interface-0.2.0.tar.gz#sha 256=dbd9c48d9c7c830e3e4b83f48eba198b5957d6729d086b7f776233e9bc71184f (from https ://pypi.org/simple/lammps-interface/) (requires-python:>=3.6). Command errored o ut with exit status 1: python setup.py egg_info Check the logs for full command output. Using cached lammps-interface-0.1.3.tar.gz (100 kB) ERROR: Command errored out with exit status 1: command: 'c:\users\li\miniconda3\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\li\AppData\Local\ Temp\pip-install-ej_l3177\lammps-interface_126c0c4b388f4fcf95c012720cc306ba\s etup.py'"'"'; file='"'"'C:\Users\li\AppData\Local\Temp\pip-inst all-ej_l3177\lammps-interface_126c0c4b388f4fcf95c012720cc306ba\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read ().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\li\AppData\Local\Temp\pip -pip-egg-info-glzk1zn9' cwd: C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps- interface_126c0c4b388f4fcf95c012720cc306ba\ Complete output (5 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\li\AppData\Local\Temp\pip-install-ej_l3177\lammps-in terface_126c0c4b388f4fcf95c012720cc306ba\setup.py", line 24, in long_description=open('README.md').read(), UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 1640: ill egal multibyte sequence

WARNING: Discarding https://files.pythonhosted.org/packages/e0/01/b29a3d37ab758e 8e14696c528253ca4ee3cc47212b1486670a7af5597e7d/lammps-interface-0.1.3.tar.gz#sha 256=2d8a90bdb70b8590fe352ebf02ec815dde38ead20c5ebc071b9002a939a7273c (from https ://pypi.org/simple/lammps-interface/). Command errored out with exit status 1: p ython setup.py egg_info Check the logs for full command output.

Are there any pre-requirements to install this modules?

ltalirz commented 3 years ago

Hi @jiamingl98 , thanks for the report.

This is a rather weird error - it looks like when trying to read the README.md it encounters a byte representation that it is not able to decode. I've tried installing from pypi and that worked fine for me. Is it possible that the default unicode encoding on your machine is not UTF-8?

Would you mind trying the following:

Can you then try:

>>> import io
>>> io.open('README.md', encoding='utf-8').read()

and see whether that works?

ltalirz commented 3 years ago

try to clone the branch https://github.com/ltalirz/lammps_interface/tree/fix-utf8 from my fork and install it from there using pip install -e .

I suspect this will have fixed the issue - let me know

jiamingl98 commented 3 years ago

The issue has fixed. Thanks.

ltalirz commented 3 years ago

just tagged v0.2.2 should be out on pypi soon