lobe / lobe-python

Python toolset for working with Lobe models
MIT License
185 stars 38 forks source link

Unable to install repository #16

Closed JosiahVillanueva closed 3 years ago

JosiahVillanueva commented 3 years ago

Good Day,

Upon trying to install the repository with the following command 'pip3 install git+https://github.com/lobe/lobe-python' I got this error ' ERROR: Command errored out with exit status 128: git clone -q https://github.com/lobe/lobe-python 'C:\SAMPLE_PATH\AppData\Local\Temp\pip-req-build-j7vrkq9p' Check the logs for full command output.'

image

cohen-rachel commented 3 years ago

I couldn't get it installed either. I got this error

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\Users\Rachel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tensorflow\include\external\com_github_grpc_grpc\src\core\ext\filters\client_channel\lb_policy\grpclb\client_load_reporting_filter.h'

As a quick fix, I cloned the whole folder, and copied the src/lobe folder into my working directory where I am running my python script.

JosiahVillanueva commented 3 years ago

Hi @rachelc8997 I did your advise I added the src/lobe folder in my working directory but I got a new error regarding "SyntaxError: future feature annotations is not defined"

mbeissinger commented 3 years ago

@JosiahVillanueva what version of Python are you using? I believe that error will not happen if you use 3.7 or 3.8

JosiahVillanueva commented 3 years ago

No @mbeissinger I am currently using "Python 3.6.8". Is there a way to manually install the repository? Or it was @rachelc8997 suggestion already? P.S. I am using Anaconda

mbeissinger commented 3 years ago

I'll look to remove the annotations feature that is causing this issue for 3.6 compatibility -- otherwise, use 3.7 or 3.8

JosiahVillanueva commented 3 years ago

Hi @mbeissinger I am quite confused. Where should I remove the annotation feature? I am also new to python.

mbeissinger commented 3 years ago

@JosiahVillanueva I just pushed the fix, try installing again

JosiahVillanueva commented 3 years ago

Hi @mbeissinger it seems that my company laptop have blocked the site to install lobe-python.

I tried installing it manually using the Setup.py but I stumbled an error like this. image

mbeissinger commented 3 years ago

@JosiahVillanueva Of course they changed the URL way that tflite_runtime was installed XD Check out https://www.tensorflow.org/lite/guide/python#install_tensorflow_lite_for_python to install tflite_runtime manually via pip3 install --extra-index-url https://google-coral.github.io/py-repo/ tflite_runtime and in the meantime I'll try to fix our setup.py to either do this for you or not fail on the install and instruct at runtime to follow instructions from Tensorflow.

JosiahVillanueva commented 3 years ago

Thank you for the help @mbeissinger this will be a great help for me and for others as well if the Setup.py will be fixed. Since I tried to install the tensorflow_lite it shows SSL error that pertains that the site is blocked again in my company machine. You've been a great help :)

mbeissinger commented 3 years ago

@JosiahVillanueva Ah ok if you aren't planning on using TFLite, it is optional here anyway. You can modify setup.py to not append to the requirements list. Comment out these lines:

# add it to the requirements, or print the location to find the version to install
if tflite_python and tflite_machine:
    requirements.append(f"tflite_runtime @ https://github.com/google-coral/pycoral/releases/download/release-frogfish/tflite_runtime-2.5.0-{tflite_python}-{tflite_machine}.whl")
else:
    print(
        f"Couldn't find tflite_runtime for your platform {sys.platform}, machine {platform.machine()}, and python version {python_version}, please see the install guide for the right version: https://www.tensorflow.org/lite/guide/python#install_just_the_tensorflow_lite_interpreter"
    )

Then you should be able to install and use the API with Tensorflow or ONNX at least

JosiahVillanueva commented 3 years ago

Thank you for the help @mbeissinger, your very good.

Solution: Used @mbeissinger advise helped upon commenting out the file 'if tflite_python...' in the Setup.py API worked.

To install the Setup.py manually 'python setup.py install'. Note that you should redirect to the folder where setup.py is located before running the script 'python setup.py install'.

Closing this ticket now