I am using a virtualenv
. I have fabric
installed, with pip
. But a pip freeze
does not give any hint about that. The package is there, in my virtualenv
, but pip is silent about it. Why could that be? Any way to debug this?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
I just tried this myself:
create a virtualenv in to the "env" directory:
next, activate the virtual environment:
the prompt changed. now install fabric:
And
pip freeze
shows the correct result:Maybe you forgot to activate the virtual environment? On a *nix console type
which pip
to find out.If you have redirected all the pre-installed packages in a file named pip-requirements.txt then it is pretty simple to fix the above issue.
1) Delete your virtualenv folder or create new one (I am giving it a name as venv)
2) Install all the requirements/dependencies from the pip-requirements.txt
3) Now you can check the installed packages for your Django application
pip freeze
4) If you had forgotten to update your requirements file(pip-requirements.txt), then install fabric again (Optional Step)
Note: After installing any dependency for your Django app, always update the requirements in any file as follows (make sure your virtualenv is activated)
That's it.