I'm running python code which uses the dlib module. I'm using arch linux, so I downloaded dlib from here: https://aur.archlinux.org/packages/dlib/
Then I try to import the dlib module, but it still doesn't work:
ModuleNotFoundError: No module named 'dlib'
Is there a dependency that I didn't download or am I downloading the wrong module? I can't figure out what the problem is, since I downloaded the official module already.
I fixed the problem, all you have to do is to search in your package manager if you are a linux user, and try importing dlib in your python code, if that didn't work, then download dlib from this link: https://sourceforge.net/projects/dclib/files/latest/download
extract the files, and run the setup.py files, it will take a while till it finishes, and that should make it work, you can now run codes using dlib library with no problems.
hope that helps someone :D.
I had a same issue, but you need to download it to your site-packpages of where your python is there for python-idle or if ur getting a download error in pycharm , I solved the error by downloading dlib from cmd to the venv of my pycharm.project directory command being install dlib--19.16.0 (current one) or you can download a .whl file which suits your python,processor configuration run dt .whl file and your good to go
Related
I have created a conda environment and activated it already.
Then inside the use_cases/ directory I execute: pip install -e use_case_b (https://github.com/geoHeil/dagster-demo/tree/master/use_cases):
...
...
Installing collected packages: use-case-b
Attempting uninstall: use-case-b
Found existing installation: use-case-b 0.0.0
Uninstalling use-case-b-0.0.0:
Successfully uninstalled use-case-b-0.0.0
Running setup.py develop for use-case-b
Successfully installed use-case-b
Now when inside the use_cases/ directory:
python
import use_case_b
works fine.
When switching to a different directory like: / (= the root of the repository I get an error message of:
ModuleNotFoundError: No module named 'use_case_b'
Why is it working once and failing in the second place? Could it be that it is not even working in the first place and only importing the sub_directory due to the __init__.py file?
How can I get the python package properly install into the virtual environment?
FYI: here you can find the full project https://github.com/geoHeil/dagster-demo
When using the cookiecutter to set up the package it works just fine.
https://github.com/audreyfeldroy/cookiecutter-pypackage
This is more like a workaround than an solution to the SF question - but works nicely and as an additional benefit has some best practices with regards to documentation and testing already built in.
I normally face that problem when im using pip to install a package. Im not sure if this gonna work for you.
In the file you are importing the package copy the following code and run it.
from pip._internal import main
main(["install", "use_case_b"])
Just ignore the warnings'
Good Luck, Let me know if it works.
I am trying to install PyHook using PIP. When I run the command on cmd pip install pyhook3 I get a C1080 error that tells me there is no such .h file located in my directory. I traced the directory, downloaded the file and it showed me another. I kept doing this until I noticed that there seems to be no end. There seems to be a lot of missing .h files in this includes folder C:\Users\User\AppData\Local\Programs\Python\Python38-32\include directory. I don't want to have to download or copy and paste source code for each of these files. Is there any way to get all of them at once, or am I missing the plot entirely?
pyhook is a Python package with binary dependencies.
When running pip install pyhook3 you download the source and ask your computer to build it so it can be installed. It thus requires a compiler and a set of header files that are apparently missing for you.
A workaround may be to download manually a compiled version of this package and install it.
You can find on this page a set of binary wheel for pyhook (not pyhook3) for python3 (32 or 64 bit). Once you have downloaded the correct .whl, you can install it with pip install the_filename_you_have_downloaded.whl
I'm using Python 3.6.5 and I've built my application in py file -it works fine-, and I can run it on cmd perfectly. So I want to built its exe file.
I tried with cx_freeze, py2exe but they didn't work for me.
Lastly I tried with PyInstaller, it looks successfully completed; but when I'm running my exe file, I have this error and I tried many ways to solve this but I didn't. The error is in this picture
ImportError: Failed to import the Cloud Storage library for Python. Make sure to install the "google-cloud-storage" module.
I'm so sure that I've installed google-cloud-storage and requests packages (I checked many times with pip install google-cloud-storage and pip install google-resumable-media[requests] and it says Requirements already installed
What I've tried are;
-adding google folders from site-packages folder to dist folder
-installing grpio (already installed)
-changing google hooks files' inside
But I didn't find any solution.
What should I do to solve this problem?
I am doing bioinformatics that has biopython dependency. Biopython always give me the following error:
I hope someone could help me with this issue. Thank you!
I had a problem with this when biopython (as a dependency) was installed during the installation of another package. Solution:
pip uninstall biopython
pip install biopython
This can occur on Biopython version >= 1.72 and has been discussed on the biopython mailing list here. This error occurs when you try and import while inside the biopython/ directory, to fix the error simply move to another directory outside the source tree and then execute your code.
If the error still occurs then likely the install has not been setup properly, and you can try running the following standard installation steps (assuming you have not used pip) to get the files and directories in the correct places:
python setup.py build
python setup.py test # not compulsory for the fix
python setup.py install # add '--prefix' flag to install to a particular directory
We have improved the traceback for future biopython releases, see 8efbf6d:
ImportError: cannot import name '_aligners': you should not import directly from the biopython source directory; please exit the source tree and re-launch your code from there
I am trying to write a basic keylogging program on python. I need to install the pywin32 and pyhook modules. I have managed to get pywin32 installed, but cannot seem to pyhook to work. I have read its possible to get it to work on later versions of python, but cannot seem to figure it out. I have tried both .exe and .whl installs. Using whl in cmd gives error that the wheel is not supported. Does anyone have a solution to install pyhook on python 3.5. Thanks
This is how I did it...
Download the py hook module that matches your version of python from here. Make sure that if you have python 32 bit you download the 32 bit module (even if you have windows 64x) and vice versa.
Open your command prompt and navigate to the folder where you downloaded the module
Type "pip install " and then the name of the file.
Ex: "pip install pyHook-1.5.1-cp27-none-win32.whl"
Note : you need pip
If your pip install have not success.
Try -> when you download a pyHook-1.5.1-cp27-none-win32.whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhook
After that move file to Programs\Python\Python35-32\Scripts path
and then pip install pyHook-1.5.1-cp27-none-win32.whl
I hope my answer is useful for you.