googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.12k stars 696 forks source link

Unable to install mlfromscrath package #1709

Closed biraj6116 closed 3 years ago

biraj6116 commented 3 years ago

!apt install mlfromscratch

Gives me:

Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package mlfromscratch

!pip install mlfromscratch

Gives me:

Collecting mlfromscratch Using cached https://files.pythonhosted.org/packages/ef/5a/afce491a5b78ff0b0a375414c94c6d46c3aa6f49bddbe8e467374defef62/mlfromscratch-0.0.4.tar.gz ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

craigcitro commented 3 years ago

This has nothing to do with colab, it's an issue with the upstream package.

For instance, here's the same failure in a vanilla docker container:

$ docker run -it --rm --entrypoint bash python:3.9
root@da2b442bd472:/# pip install mlfromscratch
Collecting mlfromscratch
  Downloading mlfromscratch-0.0.4.tar.gz (36 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0_z1vtw_/mlfromscratch/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0_z1vtw_/mlfromscratch/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 /tmp/pip-pip-egg-info-3az_2eve
         cwd: /tmp/pip-install-0_z1vtw_/mlfromscratch/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-0_z1vtw_/mlfromscratch/setup.py", line 10, in <module>
        with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
      File "/usr/local/lib/python3.9/codecs.py", line 905, in open
        file = builtins.open(filename, mode, buffering)
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-0_z1vtw_/mlfromscratch/requirements.txt'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
root@da2b442bd472:/#

I'd try reporting it upstream to the package owners.