Giter VIP home page Giter VIP logo

Comments (8)

lambdaloop avatar lambdaloop commented on May 24, 2024

Do you have a link to the Colab notebook (or perhaps a smaller version that reproduces the problem) ?
It sounds like it's some kind of environment issue, but I'm not sure how to debug this without more information

from anipose.

roaldarbol avatar roaldarbol commented on May 24, 2024

I never figured out what the error really was, but next time I tried, it worked. I had modified the Colab notebook which resides in the Google Drive, to install anipose from pip.
Have since gotten a new laptop and haven't had issues since. So I assume you're right it must have been an environment issue.

from anipose.

Virginia9733 avatar Virginia9733 commented on May 24, 2024

I never figured out what the error really was, but next time I tried, it worked. I had modified the Colab notebook which resides in the Google Drive, to install anipose from pip.
Have since gotten a new laptop and haven't had issues since. So I assume you're right it must have been an environment issue.

Hi,
I am trying to use anipose on colab as well since I don't have a laptop with GPU.
However, following the installation instruction, I could not install wxPython on colab, under the conda env that required.

I checked your notebook and haven't find the codes that how you successfully install anipose on colab.

When I try this code in the cell:

%%shell
eval "$(conda shell.bash hook)" # copy conda command to shell
conda activate anipose_env

python -m pip install -U
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04
wxPython

I got this error message:
Looking in links: https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04
Collecting wxPython
Using cached wxPython-4.1.1.tar.gz (66.0 MB)
Requirement already satisfied: pillow in /usr/local/envs/anipose_env/lib/python3.7/site-packages (from wxPython) (8.2.0)
Requirement already satisfied: six in /usr/local/envs/anipose_env/lib/python3.7/site-packages (from wxPython) (1.15.0)
Requirement already satisfied: numpy in /usr/local/envs/anipose_env/lib/python3.7/site-packages (from wxPython) (1.17.5)
Building wheels for collected packages: wxPython
Building wheel for wxPython (setup.py) ... error
ERROR: Failed building wheel for wxPython
Running setup.py clean for wxPython
Failed to build wxPython
Installing collected packages: wxPython
Running setup.py install for wxPython ... error
ERROR: Command errored out with exit status 1: /usr/local/envs/anipose_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bve7chve/wxpython_0bded69748294a3ab1cc8b713561d14a/setup.py'"'"'; file='"'"'/tmp/pip-install-bve7chve/wxpython_0bded69748294a3ab1cc8b713561d14a/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'"'"'))' install --record /tmp/pip-record-x4tzej7u/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/envs/anipose_env/include/python3.7m/wxPython Check the logs for full command output.

CalledProcessError Traceback (most recent call last)
in ()
1
----> 2 get_ipython().run_cell_magic('shell', '', 'eval "$(conda shell.bash hook)" # copy conda command to shell\nconda activate anipose_env\n\npython -m pip install -U \\n -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \\n wxPython')

2 frames
/usr/local/lib/python3.7/dist-packages/google/colab/_system_commands.py in check_returncode(self)
137 if self.returncode:
138 raise subprocess.CalledProcessError(
--> 139 returncode=self.returncode, cmd=self.args, output=self.output)
140
141 def repr_pretty(self, p, cycle): # pylint:disable=unused-argument

CalledProcessError: Command 'eval "$(conda shell.bash hook)" # copy conda command to shell
conda activate anipose_env

python -m pip install -U
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04
wxPython' returned non-zero exit status 1.

from anipose.

roaldarbol avatar roaldarbol commented on May 24, 2024

I've made it work without running conda in Google Colab (which seems like a lot of work to get to work), just by adding this to the top of the .ipynb:

!pip install aniposelib
#Now, let's link to your GoogleDrive. Run this cell and follow the authorization instructions:
#(If you're running this with the provided example, make sure that it's in your Google Drive)

from google.colab import drive
drive.mount('/content/drive')
# Change directory to the correct folder with the videos (may not be the same as this one)
%cd /content/drive/MyDrive/anipose/2020-04-02-aniposelib-hand-demo/   

from anipose.

Virginia9733 avatar Virginia9733 commented on May 24, 2024

Thank you so much!!!!
However, I tried to install anipose directly in colab, but get this error message:
Screen Shot 2021-06-03 at 7 07 49 PM

Then I redirect the working directory to the demo folder and tried to run anipose analyze
I got this error message...
Screen Shot 2021-06-03 at 7 10 28 PM

Screen Shot 2021-06-03 at 7 07 59 PM

from anipose.

Virginia9733 avatar Virginia9733 commented on May 24, 2024

However, when I run anipose in conda, it could import anipose, but failed when I run anipose analyze
No module named wx.
Screen Shot 2021-06-03 at 7 14 23 PM

from anipose.

roaldarbol avatar roaldarbol commented on May 24, 2024

It seems you're trying to call terminal/command prompt commands (e.g. 'anipose analyze'), which won't work (without, again, quite a bit of other adaptations). Just use the python notebook available within their Google Drive (direct link to the file), and insert the lines I mentioned. Then it should work. :-)

from anipose.

Virginia9733 avatar Virginia9733 commented on May 24, 2024

Thank you very much!!! I could install aniposelib in colab, however, since the code in their tutorial is all in the terminal, I am quite lost about which functions should I call to analyze the video, like analyze, filter, etc.
https://anipose.readthedocs.io/en/latest/tutorial.html
I am sorry :-(

from anipose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.