AlexVerrico / octoprint-stats

Stats for your octoprint instance. Mirrored from https://github.com/amsbr/OctoPrint-Stats originally
15 stars 7 forks source link

Plugin installs as "Unknown" #4

Closed rosenstand closed 4 years ago

rosenstand commented 4 years ago

After installing the plugin, it is recognized as "Unknown". After restarting OctoPrint, the plugin is not visible in the Plugin Manager.

I tried installing both by URL and by downloading- and uploading the 3.0.0 release tar. Both with the same result.

Skærmbillede 2020-10-25 kl  09 03 30
AlexVerrico commented 4 years ago

Hi @rosenstand Can you please post the log files here to aid in troubleshooting. Cheers, Alex.

skimaniac commented 4 years ago

I have the same problem, I updated my octoprint with python 3, but it didn't fix the problem.

When I try to install the plugin via SSh, I get an error message:

"DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting https://github.com/AlexVerrico/octoprint-stats/archive/master.zip Using cached https://github.com/AlexVerrico/octoprint-stats/archive/master.zip ERROR: Command errored out with exit status 255: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-EAY52p/setup.py'"'"'; file='"'"'/tmp/pip-req-build-EAY52p/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-SUupdk cwd: /tmp/pip-req-build-EAY52p/ Complete output (1 lines): Could not import OctoPrint's setuptools, are you sure you are running that under the same python installation that OctoPrint is installed under?

ERROR: Command errored out with exit status 255: python setup.py egg_info Check the logs for full command output."

If I run the command: ~/oprint/bin/pip install "https://github.com/AlexVerrico/octoprint-stats/archive/master.zip" it seems to work, but notting appear in the web ui.

octoprint-3.log plugin_pluginmanager_console.log

Thank you Bruno

AlexVerrico commented 4 years ago

Hi @skimaniac Can you please try running the command ~/oprint/bin/pip install pandas, then restart your octoprint and see if it works? Cheers, Alex.

skimaniac commented 4 years ago

It does not change anything

pi@octopi:~ $ ~/oprint/bin/pip install pandas
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pandas in ./oprint/lib/python3.7/site-packages (1.1.3)
Requirement already satisfied: python-dateutil>=2.7.3 in ./oprint/lib/python3.7/site-packages (from pandas) (2.8.1)
Requirement already satisfied: numpy>=1.15.4 in ./oprint/lib/python3.7/site-packages (from pandas) (1.19.2)
Requirement already satisfied: pytz>=2017.2 in ./oprint/lib/python3.7/site-packages (from pandas) (2020.1)
Requirement already satisfied: six>=1.5 in ./oprint/lib/python3.7/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0)
pi@octopi:~ $ 

Thank's for the support ;)

Capture d’écran, le 2020-10-28 à 08 17 12
asage-me commented 4 years ago

Same error here, ~/OctoPrint/venv/bin/pip install pandas has same output as above

Flameraver commented 4 years ago

Bevor I set up my octopi completly new, I've had the same problem. After making a fresh install, my first step was to install Python3 and then tried to install the plugin. Now I got this error message:

Installiere Plugin "Printer Statistics" von https://github.com/AlexVerrico/octoprint-stats/archive/master.zip.../home/pi/oprint/bin/python -m pip --disable-pip-version-check install file:///tmp/tmptawdmpqu/octoprint-stats-master.zip --no-cache-dirLooking in indexes: https://pypi.org/simple, https://www.piwheels.org/simpleProcessing /tmp/tmptawdmpqu/octoprint-stats-master.zipRequirement already satisfied: OctoPrint in /home/pi/oprint/lib/python3.7/site-packages (from OctoPrint-Stats==3.0.0) (1.4.2)Collecting tinydbDownloading tinydb-4.2.0-py3-none-any.whl (21 kB)Collecting pandasDownloading pandas-1.1.4.tar.gz (5.2 MB)Installing build dependencies: startedInstalling build dependencies: finished with status 'done'Getting requirements to build wheel: startedGetting requirements to build wheel: finished with status 'error'ERROR: Command errored out with exit status 1:command: /home/pi/oprint/bin/python /home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpn98y3r6tcwd: /tmp/pip-install-cg7w9spe/pandasComplete output (57 lines):Traceback (most recent call last):File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/pkg_resources/init.py", line 343, in get_providermodule = sys.modules[moduleOrReq]KeyError: 'numpy'During handling of the above exception, another exception occurred:Traceback (most recent call last):File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/numpy/core/init.py", line 16, in from . import multiarrayImportError: libf77blas.so.3: cannot open shared object file: No such file or directoryDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "/home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in main()File "/home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in mainjson_out['return_val'] = hook(*hook_input['kwargs'])File "/home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheelreturn hook(config_settings)File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 150, in get_requires_for_build_wheelconfig_settings, requirements=['wheel'])File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 130, in _get_build_requiresself.run_setup()File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 254, in run_setupself).run_setup(setup_script=setup_script)File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 145, in run_setupexec(compile(code, file, 'exec'), locals())File "setup.py", line 792, in setup_package()File "setup.py", line 762, in setup_packageext_modules=maybe_cythonize(extensions, compiler_directives=directives),File "setup.py", line 521, in maybe_cythonizenumpy_incl = pkg_resources.resource_filename("numpy", "core/include")File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/pkg_resources/init.py", line 1128, in resource_filenamereturn get_provider(package_or_requirement).get_resource_filename(File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/pkg_resources/init.py", line 345, in get_providerimport(moduleOrReq)File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/numpy/init.py", line 142, in from . import add_newdocsFile "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/numpy/add_newdocs.py", line 13, in from numpy.lib import add_newdocFile "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/numpy/lib/init.py", line 8, in from .type_check import File "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/numpy/lib/type_check.py", line 11, in import numpy.core.numeric as _nxFile "/tmp/pip-build-env-jhbib7j4/overlay/lib/python3.7/site-packages/numpy/core/init.py", line 26, in raise ImportError(msg)ImportError:Importing the multiarray numpy extension module failed. Mostlikely you are trying to import a failed build of numpy.If you're working with a numpy git repo, try git clean -xdf (removes allfiles not under version control). Otherwise reinstall numpy.Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory----------------------------------------ERROR: Command errored out with exit status 1: /home/pi/oprint/bin/python /home/pi/oprint/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpn98y3r6t Check the logs for full command output.Fehler!Could not parse output from pip, see plugin_pluginmanager_console.log for generated output

AlexVerrico commented 4 years ago

G'Day all. I suspect that this issue may be related to hardware, as I am currently only able to test using desktop (x86) machines. Can you please all confirm what you are running octoprint on? Cheers, Alex.

skimaniac commented 4 years ago

G'Day all. I suspect that this issue may be related to hardware, as I am currently only able to test using desktop (x86) machines. Can you please all confirm what you are running octoprint on? Cheers, Alex.

For me: model: Raspberry Pi 3 Model B Rev 1.2

asage-me commented 4 years ago

Raspberry Pi 4 B here. I'm pretty sure the 4GB model.

AlexVerrico commented 4 years ago

Can someone please try running sudo apt update && sudo apt install python3-numpy -y then reinstall the plugin and see if that fixes it?

skimaniac commented 4 years ago

Can someone please try running sudo apt update && sudo apt install python3-numpy -y then reinstall the plugin and see if that fixes it?

nothing change

AlexVerrico commented 4 years ago

Can you also try running sudo apt install libatlas-base-dev and let me know how that goes?

skimaniac commented 4 years ago

Can you also try running sudo apt install libatlas-base-dev and let me know how that goes?

Yes! that work! Thank's

AlexVerrico commented 4 years ago

🎉 Cool. If @atsage , @Flameraver , and @rosenstand could also try this and let me know how it goes that would be great.

creizlein commented 4 years ago

I can also confirm that after installing libatlas-base-dev the plugin installed properly and seems to be working 👍 No data just yet but at least it shows in the tab !

asage-me commented 4 years ago

Same as @creizlein, no data but it shows up yet but it appears at least now. Next time I do a print I will check it.

Flameraver commented 4 years ago

sudo apt install libatlas-base-dev also worked for me.

Great! Thank you.