Giter Site home page Giter Site logo

Comments (12)

weirenorweiren avatar weirenorweiren commented on July 28, 2024 1

Thanks for the reply! I finally figured it out with the help of ChatGPT. The Windows equivalence for export PYTHONPATH=(cd ../ && pwd):pwd:$PYTHONPATH is set PYTHONPATH=%cd%\..\;%cd%;%PYTHONPATH%.

from tapnet.

vitacon avatar vitacon commented on July 28, 2024 1

Hm, the variable PYTHONPATH is not defined at the beginning so it basically sets something like this:
set PYTHONPATH=Z:\Wei\;Z:\Wei\tapnet\

from tapnet.

vitacon avatar vitacon commented on July 28, 2024

FYI I made a step forward by running this:
pip install "jax[cpu]===0.4.11" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver

It installed a slightly different version. =}

Now I am stuck on missing tensorflow.
tensorflow -> python[version='3.10.|3.9.|3.8.|3.7.|3.6.|3.5.']
Your python: python=3.11

I suppose I have to downgrade python.

from tapnet.

yangyi02 avatar yangyi02 commented on July 28, 2024

Hi vitacon,

Unfortunately we don't have experinece running the TAP models in this repository on Window. However, there is another related issue, please take a look if that is helpful #25

from tapnet.

vitacon avatar vitacon commented on July 28, 2024

Thanks for the reply.

Unfortunately we don't have experinece running the TAP models in this repository on Window. However, there is another related issue, please take a look if that is helpful #25

I already read that - that's why I started experimenting with jax and it seems this part is solved.

On my other computer with an older installation of conda I got i bit farther but I still can't make it work.

It missed kubric even though it's not listed in requirements so I used
pip install kubric

It updated a lot of libraries and I got an error that seemed to be related to tensorflow.

File "C:\Users\Vita\Anaconda3\lib\site-packages\keras\src\saving\legacy\saved_model\load_context.py", line 68, in <module>
    tf.__internal__.register_load_context_function(in_load_context)
AttributeError: module 'tensorflow.compat.v2.__internal__' has no attribute 'register_load_context_function'

This led me to a Tensorflow forum suggesting removing keras.

pip uninstall keras
pip install tensorflow

I did that and I now I get a different error. =}

File "C:\Users\Vita\Anaconda3\lib\site-packages\etils\enp\numpy_utils.py", line 150, in is_tf_dtype
    return self.has_tf and isinstance(dtype, self.tf.dtypes.DType)
AttributeError: module 'tensorflow' has no attribute 'dtypes'

from tapnet.

yangyi02 avatar yangyi02 commented on July 28, 2024

pip install kubric is not recommended.

Instead, try download kubric from github as a subdirectory and place it as a separate directory beside tapnet.

git clone https://github.com/google-research/kubric.git

Install requirements:

pip install -r requirements.txt

from tapnet.

vitacon avatar vitacon commented on July 28, 2024

By "beside" you mean parallel with tapnet?

Directory of C:\Users\Vita\video

23.08.2023  20:56    <DIR>          .
23.08.2023  20:56    <DIR>          ..
23.08.2023  20:58    <DIR>          kubric
22.08.2023  18:49    <DIR>          tapnet

It does not seem to change anything and I still get the same error related to tensorflow.
I think I should focus on that.

from tapnet.

weirenorweiren avatar weirenorweiren commented on July 28, 2024

Hi @vitacon, I am curious that have you managed to run the code on Windows? I followed the instruction on the front page and managed to pip install -r requirements.txt (not the requirements_inference.txt) in an Anaconda environment. However, I encountered the following problem:

(tapnet) Z:\Wei>python3 ./tapnet/live_demo.py
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

I guess it results from the fact that I don't know the Windows equivalent for export PYTHONPATH=(cd ../ && pwd):pwd:$PYTHONPATH. If you happen to have some experience on this issue, I appreciate it if you could share!

from tapnet.

weirenorweiren avatar weirenorweiren commented on July 28, 2024

I also tried to change python3 into python. The previous issue is gone but replaced with the followings. Before that, I also randomly tried setx.exe PYTHONPATH and set PYTHONPATH according to some web search but nothing changed. I am not sure whether setx.exe PYTHONPATH and set PYTHONPATH caused the following errors... Any advices or comments would be appreciated!

(tapnet) Z:\Wei>python ./tapnet/live_demo.py
Traceback (most recent call last):
  File "Z:\Wei\tapnet\live_demo.py", line 26, in <module>
    from tapnet import tapir_model
ModuleNotFoundError: No module named 'tapnet'
(tapnet) Z:\Wei\tapnet>python ./live_demo.py
Traceback (most recent call last):
  File "Z:\Wei\tapnet\live_demo.py", line 26, in <module>
    from tapnet import tapir_model
ModuleNotFoundError: No module named 'tapnet'

from tapnet.

vitacon avatar vitacon commented on July 28, 2024

have you managed to run the code on Windows?

Hello, no - unfortunately I got stuck on the tensorflow problem and I let it be.

guess it results from the fact that I don't know the Windows equivalent for export PYTHONPATH=

I used this: set PYTHONPATH=\users\vita\video\tapnet
I.e. I just set the value of the environment variable PYTHONPATH to the path of the TAPNET project on my disk.

from tapnet.

weirenorweiren avatar weirenorweiren commented on July 28, 2024

Thanks for the reply! I tried everything I could think of, however, it still doesn't work...

(tapnet) Z:\Wei\tapnet>set PYTHONPATH=Z:\Wei\tapnet

(tapnet) Z:\Wei\tapnet>python ./live_demo.py
Traceback (most recent call last):
  File "Z:\Wei\tapnet\live_demo.py", line 26, in <module>
    from tapnet import tapir_model
ModuleNotFoundError: No module named 'tapnet'

(tapnet) Z:\Wei\tapnet>cd ..

(tapnet) Z:\Wei>python ./tapnet/live_demo.py
Traceback (most recent call last):
  File "Z:\Wei\tapnet\live_demo.py", line 26, in <module>
    from tapnet import tapir_model
ModuleNotFoundError: No module named 'tapnet'

(tapnet) Z:\Wei>set PYTHONPATH=Z:\Wei\tapnet

(tapnet) Z:\Wei>python ./tapnet/live_demo.py
Traceback (most recent call last):
  File "Z:\Wei\tapnet\live_demo.py", line 26, in <module>
    from tapnet import tapir_model
ModuleNotFoundError: No module named 'tapnet'

(tapnet) Z:\Wei>python3 ./tapnet/live_demo.py
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

I would do more study on those commands and thanks again for your help!

from tapnet.

vitacon avatar vitacon commented on July 28, 2024

from tapnet import tapir_model

I suppose the failing line should just import file tapir_model.py from tapnet folder.

from tapnet.

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.