Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not run any .py in /app #8

Open
Cathgao opened this issue Feb 3, 2020 · 5 comments
Open

Can not run any .py in /app #8

Cathgao opened this issue Feb 3, 2020 · 5 comments

Comments

@Cathgao
Copy link

Cathgao commented Feb 3, 2020

python app\manual_poser.py
Traceback (most recent call last):
  File "app\manual_poser.py", line 13, in <module>
    from poser.morph_rotate_combine_poser import MorphRotateCombinePoser256Param6
ModuleNotFoundError: No module named 'poser.morph_rotate_combine_poser'; 'poser' is not a package

I am using Python 3.6.8 , and I have installed all the dependencies including CUDA and cudnn

Requirement already satisfied: torch in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (1.4.0)
Requirement already satisfied: dlib in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (19.19.0)
Requirement already satisfied: opencv-python in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (4.2.0.32)
Requirement already satisfied: numpy in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (1.18.1)
Requirement already satisfied: pillow in c:\users\gaope\appdata\local\programs\python\python36\lib\site-packages (7.0.0)
 
@Cathgao
Copy link
Author

Cathgao commented Feb 4, 2020

I can run if I put all .py files into one folder and edit all path in every .py files

@dragonmeteor
Copy link
Collaborator

You might have another package called "poser" in your Python installation. Adding the project's directory to the PYTHONPATH environment variable variable before running "python app/manual_poser.py" might help.

https://stackoverflow.com/questions/54100236/absolute-import-results-in-modulenotfounderror

@reimurin
Copy link

reimurin commented Feb 4, 2020 via email

@dragonmeteor
Copy link
Collaborator

@reimurin Your problem is a different one. @Cathgao's problem stems from some misconfiguration of the Python library. Yours seems to be related to the machine's configuration. Please try following my suggestion in your thread.

@Cathgao
Copy link
Author

Cathgao commented Feb 9, 2020

You might have another package called "poser" in your Python installation. Adding the project's directory to the PYTHONPATH environment variable variable before running "python app/manual_poser.py" might help.

https://stackoverflow.com/questions/54100236/absolute-import-results-in-modulenotfounderror

not only the "poser.py" but all the .py files in the other folders can not be loaded. It seems the path of the current working path does not work. I just put them all together and edit the path in .py files and they work fine.

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

No branches or pull requests

3 participants