marcotcr / checklist

Beyond Accuracy: Behavioral Testing of NLP models with CheckList
MIT License
2.01k stars 204 forks source link

pip install fails #22

Closed zizhec closed 4 years ago

zizhec commented 4 years ago

pip install keeps failing with the following msg:

ERROR: Command errored out with exit status 1: command: 'd:\python\vir37v1\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\Users\CAIZ~1\AppData\Local\Temp\pip-install-by_ojkpx\checklist\setup.py'"'"'; file='"'"'D:\Users\CAIZ~1\AppData\Local\Temp\pip-install-by_ojkpx\checklist\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 'D:\Users\CAIZ~1\AppData\Local\Temp\pip-pip-egg-info-hi8iwmvg'

tongshuangwu commented 4 years ago

Hi there! Unfortunately, it's a bit hard to guess the actual error given the current msg. For now, I'd suggest directly cloning & installing from the repo. Please let us know if you still run into errors -- And if so, hopefully we get a clearer msg there!

yellybeans commented 4 years ago

Hey, I am running into a similar problem (same for pip and clone&install):

 ERROR: Command errored out with exit status 1:
     command: /Users/Alex/miniconda3/envs/chatbot1/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gz/h1nqpxs53gd_189mys1gcftm0000gp/T/pip-install-afbqb3u8/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/gz/h1nqpxs53gd_189mys1gcftm0000gp/T/pip-install-afbqb3u8/mysqlclient/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 /private/var/folders/gz/h1nqpxs53gd_189mys1gcftm0000gp/T/pip-install-afbqb3u8/mysqlclient/pip-egg-info
         cwd: /private/var/folders/gz/h1nqpxs53gd_189mys1gcftm0000gp/T/pip-install-afbqb3u8/mysqlclient/
    Complete output (12 lines):
    /bin/sh: mysql_config: command not found
    /bin/sh: mariadb_config: command not found
    /bin/sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/gz/h1nqpxs53gd_189mys1gcftm0000gp/T/pip-install-afbqb3u8/mysqlclient/setup.py", line 15, in <module>
        metadata, options = get_config()
      File "/private/var/folders/gz/h1nqpxs53gd_189mys1gcftm0000gp/T/pip-install-afbqb3u8/mysqlclient/setup_posix.py", line 65, in get_config
        libs = mysql_config("libs")
      File "/private/var/folders/gz/h1nqpxs53gd_189mys1gcftm0000gp/T/pip-install-afbqb3u8/mysqlclient/setup_posix.py", line 31, in mysql_config
        raise OSError("{} not found".format(_mysql_config_path))
    OSError: mysql_config not found
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Any ideas on how to fix this?

tongshuangwu commented 4 years ago

Hi! Looks like the pip ran into some issues when installing a dependency called pattern (mysqlclient is a dependency of the pattern package.) To solve this specific issue, hopefully this Stackoverflow discussion is useful.

Alternatively, like Marco pointed out here, if you do the following, you should be able to bypass the mysqlclient installation but still get all the functionalities of CheckList:

Please let us know if either solution works!

yellybeans commented 4 years ago

I tried the latter one and it worked without any problems :) thanks

marcotcr commented 4 years ago

It should work now even without this hack, since 6ad482f6150c2100f4bde86dfc6bccd817c3deb2