I installed openface in a virtual environment by following these steps.
git clone https://github.com/cmusatyalab/openface
cd openface
python setup.py install
It gave me the following output after executing python setup.py install
running install
running build
running build_py
running install_lib
running install_egg_info
Writing C:\Users\Haneesh\PycharmProjects\Medium\venv\Lib\site-packages\openface-0.2.1-py3.6.egg-info
But when I am importing openface in python it is giving the following error
(venv) C:\Users\Haneesh\PycharmProjects\Medium\openface>.\util\align-dlib.py .\training-images\ align outerEyesAndNose .\aligned-images\ --size 96
Traceback (most recent call last):
File "C:\Users\Haneesh\PycharmProjects\Medium\openface\util\align-dlib.py", line 24, in <module>
import openface
ImportError: No module named openface
I tried importing openface in python console also, didn't work.
Openface as it is, gets installed on python2. You can see this line
python2 setup.py install && \
in the dockerfile
You can however try converting it to python3 with a help of modules like 2to3 or six. At the moment, if it's possible, using python2 is the best option.
Related
I've installed the "openexr" package within my windows system. To do this, i used powershell from my blender installation folder "C:\Program Files\Blender Foundation\Blender 3.0\3.0\python" to launch the command ".\bin\python.exe -m ensurepip", for installing pip, and then "pip install openexer" to install the package.
Everything seems fine, but when I open blender and start to code with a simple
import openexr
I obtain this error:
Traceback (most recent call last):
File "\Text", line 1, in <module>
ModuleNotFoundError: No module named 'openexr'
Error: Python script failed, check the message in the system console
The module seems installed, but it's like blender cannot access it. Someone can help me? I would be extremely happy if this could work !
At the moment I tried to re-install pip or the openexr package, but the problem persist.
Also, if I try to re-install openexr, the system answer me that the package is already installed.
I want to install a python-lib named crfnet which is a deep-learning library whose environment is: Windows10 CUDA11.1 Tensorflow2.4.4 keras2.4.4.
I have installed all of the packages needed, but when I run "python setup.py build_ext --inplace" in the windows shell, it raised an error "ModuleNotFoundError: No module found named crfnet".
Here are the details that the shell displayed:
(crfnet) PS D:\Naca\Deep_learning_Reproduction> python .\train_crfnet.py --config .\configs\default.cfg
Using TensorFlow backend.
2022-04-05 18:30:00.045863: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
Traceback (most recent call last):
File ".\train_crfnet.py", line 29, in <module>
import crfnet # noqa: F401
ModuleNotFoundError: No module named 'crfnet'
How should I solve it?
thank you very much!
I have tried "python setup.py build_ext" and "python setup.py install" and so on, but it remains to be the same problem.
I have an issue with Python on my Mac with High Sierra.
After running pip install pysal, I have a successful installation. However, the module is not found when I run in python:
> import pysal
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pysal
I do not face such errors when running the same command in python2. However, most of my python scripts call the interpreter at the beginning of the file with #!/usr/bin/env python, so I would prefer not having to rely on python2 (I don't know how to do it either).
I figured out that this is python's executable is not on the same location where pip installs the modules:
macbook-pro-3:~ ME$ which -a python
/usr/bin/python
macbook-pro-3:~ ME$ which -a pip
/usr/local/bin/pip
I tried to follow the solution proposed by #J0ANMM in Modules are installed using pip on OSX but not found when importing . It recommeds downloading the script get-pip.py and executing it with sudo /usr/bin/python get-pip.py. I tried, but it did not change anything (the previous which commands still yield the same thing).
How do I manage to make pip work with my version of python?
I was trying to work with python virtualenv on the Zroya python wrapper around win32 API. Although I did installed the modules using pip, and although they are shown in cli using the command
pip freeze
,when trying to execute the .py file that uses the modules it shows the following error.
Traceback (most recent call last):
File "TesT.PY", line 2, in <module>
from zroya import NotificationCenter
ImportError: No module named 'zroya'
What is the reason for this cause ? I'm using python 3.4. When checked on
>>>help("modules")
on python cli, the modules that were installed using pip aren't listed.
Your virtualEnv is separate from OS Python environment.
Check whether you installed 'zroya' module in OS Python env or virtualEnv.
Run bin/activate in your virtual env, and check if 'zroya' module exists
>>>help("modules")
If no module named Zroya, run install command pip install xxx after activating virtual env.
Installing zroya should solve your problem.
Installation instructions: https://pypi.python.org/pypi/zroya
There seems to be some issue with the pip install. Copying the zroya directory from github repository over to PYTHONPATH resolved the conflict.
I installed openface using the link
But when i am importing openface in python it is giving an error
./util/align-dlib.py ./home/admin1/Dhoni/ align outerEyesAndNose ./aligned-images/ --size 96
Traceback (most recent call last):
File "./util/align-dlib.py", line 24, in <module>
import openface
ImportError: No module named openface
Please help me!!!!!
If you are on Linux,
Clone the project :https://github.com/cmusatyalab/openface
cd openface
python setup.py install
Then create an empty file named __init__.py inside the openface/ directory
Try running the demo command : ./demos/compare.py images/examples/{lennon*,clapton*}
Note: If the demo fails due to dependency issue, try to install those dependencies. Like in my case I had to install following as well
luarocks install torch
luarocks install nn
luarocks install dpnn
Do this in your terminal:
cd /home/your_username/openface
python setup.py install
This should help you.