Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

How to run the code in Python3? #17

Open
faziletgokbudak opened this issue Feb 9, 2022 · 1 comment
Open

How to run the code in Python3? #17

faziletgokbudak opened this issue Feb 9, 2022 · 1 comment

Comments

@faziletgokbudak
Copy link

faziletgokbudak commented Feb 9, 2022

I first tried to install tensorflow-gpu==1.1.0 with pip in a Python2.7 virtual environment. However, I got the following error:

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 pip.pypa.io/en/latest/development/release-process/… pip 21.0 will remove support for this functionality. 
ERROR: Could not find a version that satisfies the requirement tensorflow==1.1.0 (from versions: none) 
ERROR: No matching distribution found for tensorflow==1.1.0

my pip version is 20.3.4.

Later, I created a Python3.6 venv and installed the required packages with pip. I was able to run make to build the custom bilateral grid operator, but when I tried to run py.test test, I got the following error:

python(3):ERROR:105: Unable to locate a modulefile for 'python/3.3'
============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-7.0.0, pluggy-1.0.0
rootdir: /rds/user/fg405/hpc-work/hdrnet-first/hdrnet
collected 0 items / 1 error

==================================== ERRORS ====================================
______________________ ERROR collecting test/ops_test.py _______________________
ImportError while importing test module '/rds/user/fg405/hpc-work/hdrnet-first/hdrnet/test/ops_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/software/master/python/3.6/lib/python3.6/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
test/ops_test.py:29: in <module>
    import hdrnet.hdrnet_ops as ops
E   ImportError: dynamic module does not define module export function (PyInit_hdrnet_ops)

The only change I have made in the script is to insert the dir path with sys.path.insert() as the hdrnet module was not imported otherwise.

@AvadaKarrot
Copy link

AvadaKarrot commented Apr 19, 2024

Sorry to interrupt, have u solved the problem using python3? Could you please share your solution? Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants