Virtualenv installed package not found - python

I installed a django-secure into a virtualenv using pip. The install was normal. The module shows up in the virtualenv pip list and in virtualenvs/dev/lib/python2.7/site-packages. I get the following error when running my code.
ImportError: No module named djangosecure
The folder is in there and there is an init. No install issues. What am I doing wrong and how do I fix it?

Make sure your wsgi file points to the right virtualenv!

Related

how i can i solve no module named can error?

hello i'm using python 3 and ros noetic, and i got this error
import can
ImportError: No module named can
I've got this error before, and I solved it through a very simple can-bus related installation command in google. But I can't find that command now
I've tried all the like $ sudo apt install python3-can.
but I can't fix it at all
thank you................
The problem is, that the module can't be found by your python.
first, try to remove the package with:
pip uninstall python-can
and re-install it with
pip install python-can
In case you have several versions of python installed (such as python2 and python3) make sure, you use
pip3
instead of pip.
Next you can try to manually search your package directories for the package, if it is even there.
Try cloning the library with git and running the setup.py installation, worked for me.

I have an error when installing the SpeechRecognition

pip install SpeechRecognition
I try to install SpeechRecognition with the command above but i get this message:
from http import cookies
ImportError: cannot import name 'cookies' from partially initialized module 'http' (most likely due to a circular import) (C:\Users\52644\venv\Lib\site-packages\django\http\__init__.py)
Can someone help me with this please.
I already solved it, in the directory variables I had one that I created that was named PYTHONPATH, you donĀ“t have to do that because python does that automatically, so you would have literally kind of a copy of all the files, that was producing the error. So, i just deleted that variable and it worked. Thanks fo the ones that answered.
While working with a large framework as Django one must always work in a virtual environment. Please check if you have your virtual environment activated. If not, then follow the steps:
cd your_working_directory
virtualenv environment_name where environment_name can be any name you want.
environment_name/Scripts/activate if on Windows
Or environment_name/bin/activate if on MacOS
Then after activating the environment you can install all the dependencies using pip. i.e pip install django or pip install SpeechRecognition

ModuleNotFoundError: No module named 'win32crypt'

I'm trying to run a Python module for a school project and I am getting this error ModuleNotFoundError: No module named 'win32crypt' at line import win32crypt.
I've search the website for solution and encountered a post that states pywin32 is required. So I installed it with pip. I also tried installing pypiwin32. None of these installs worked. Now I've tried Dependency Walker to see if there are any dependencies missing and I see at least 100 DLLs that are. How can I fix the issue?
win32cryrpt is a part of the Windows Extensions for Python or pywin32. It is a wrapper around the Windows crypto API. It doesn't make sense to try and install it without pywin32 and if your install of that has failed then that is the problem you have to solve.
Please try pip install pypiwin32 again, being sure to execute it in the correct folder, which is the Scripts subfolder of the Python environment you want to install it in. You may have more than one Python installation without realizing it, and if you run pip from outside that folder, you may get a different instance of pip. The standard location for Python installations is C:\Program Files\Python3x. If the pip install doesn't complete as expected then edit your question to include the messages from the failed install. Did not work isn't enough to go on.

ImportError: No module named pyreadability in conda env

in my python code I've got the line:
from pyreadability import pyreadability as pyrb
And I'm getting the error :
ImportError: No module named pyreadability
I'm in Ubuntu, using python 2.7 and running code inside a conda env named mzh27.
I already tried these commands but none of them made the error solve
pip install PyReadability
conda install -c anaconda lxml
/home/{usr}/anaconda2/envs/mzh27/bin/pip install PyReadability
pip install readability-lxml
/home/{usr}/anaconda2/envs/mzh27/bin/pip readability-lxml
In all of those cases, the module installed successfully but error was still there.
Any Idea what to do for it?
The problem was the repository I've cloned was missing the file named pyreadability.py. The package was not the one I thought. It was implemented by the repository owner (who forgot to add files to the repository) and just have similar names to python packages that are available to install.

No module named 'captcha.fields'

Hi~I have got a ModuleNotFoundError saying "No module named 'captcha.fields'" when I run manage.py in my Django project.
I confirm that django-simple-captcha has been installed and successfully imported into my programme. But I check the captcha package and I haven't found any definition for captcha.fields.
Could anyone help me, please? Thank you.
pip install django-recaptcha
use this to install package in your python environment
Simply uninstall the package from your virtual environment and reinstall it. Do migrate if need be. The issue should be solved.

Categories

Resources