I am trying to pip install ibmdbpy and I am getting the following syntax error:
# pip install --pre ibmdbpy
Downloading/unpacking ibmdbpy
Downloading ibmdbpy-0.1.0b26-py2.py3-none-any.whl (153kB): 153kB downloaded
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): pandas in /usr/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): future in /usr/local/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): lazy in /usr/local/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): pypyodbc in /usr/local/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/lib/python2.7/dist-packages (from pandas->ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in /usr/lib/python2.7/dist-packages (from pandas->ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from pypyodbc->ibmdbpy)
Installing collected packages: ibmdbpy
Compiling /tmp/pip-build-AqhW1S/ibmdbpy/ibmdbpy/benchmark/benchmark.py ...
SyntaxError: unqualified exec is not allowed in function 'run' because it contains a nested function with free variables (benchmark.py, line 184)
Successfully installed ibmdbpy
Cleaning up...
It says successfully installed but is it really given the syntax error?
The syntax error is with benchmark.py. I assume this is a benchmarking script and not critical to the driver's operation. In the past I've found that you can get some errors installing python modules and if it says successful, you are ok.
Indeed, the benchmark.py does not contain any critical function. It has been used internally only to assess the scalability of various statistical functions.
If the install was successful, it should be ok !
However, thank you for notifying the error. It seems this is due to a difference in the exec function between Python 2.X and 3.X. We are going to provide a patch for it. Should be solved in the next version !
Related
I am having .whl file for tensorflow 1.14.0 to be installed on Raspberry Pi 3B board. When I run the following command,
sudo pip2 install tensorflow-1.14.0-cp27-none-linux_armv7l.whl
I get the following error:
Could not find a version that satisfies the requirement tensorboard<1.15.0,>=1.14.0 (from tensorflow==1.14.0) (from versions: )
No matching distribution found for tensorboard<1.15.0,>=1.14.0 (from tensorflow==1.14.0)
I tried to do some other hacks like:
sudo pip2 install --ignore-installed --upgrade Downloads/tensorflow-1.14.0-cp27-none-linux_armv7l.whl
and even this:
curl http://bootstrap.pypa.io/get-pip.py | python
but the error remains the same.
Does anyone have any idea about this because I ran the same command on another RPI of same model and the command worked.
I am using tensorflow with python 2.7. However, after updating python 2.7.10 to 2.7.13, I get an import error with tensorflow
File "", line 1, in
File "/Users/usrname/Library/Python/2.7/lib/python/site-
packages/tensorflow/__init__.py", line 24, in
from tensorflow.python import *
File "/Users/usrname/Library/Python/2.7/lib/python/site-
packages/tensorflow/python/__init__.py", line 63, in
from tensorflow.core.framework.graph_pb2 import *
File "/Users/usrname/Library/Python/2.7/lib/python/site-
packages/tensorflow/core/framework/graph_pb2.py", line 6, in
from google.protobuf import descriptor as _descriptor
ImportError: No module named google.protobuf
Output from pip install protobuf
Requirement already satisfied: protobuf in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: setuptools in /Users/usrname/Library/Python/2.7/lib/
python/site-packages (from protobuf)
Requirement already satisfied: six>=1.9 in /Library/Python/2.7/site-packages/
six-1.10.0-py2.7.egg (from protobuf)
Requirement already satisfied: appdirs>=1.4.0 in /usr/local/lib/python2.7/site-packages
(from setuptools->protobuf)
Requirement already satisfied: packaging>=16.8 in /usr/local/lib/python2.7/site-packages
(from setuptools->protobuf)
Requirement already satisfied: pyparsing in /usr/local/lib/python2.7/site-packages
(from packaging>=16.8->setuptools->protobuf)
Output from which python:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
I believe this path changed after the python update, but not sure. A solution could possibly be to downgrade python, but this seems like a bad solution? As I work in a team, I would like to avoid reinstalling Tensorflow due to end up with different versions, but this is perhaps the way to go? Any advice?
Update: I tired to install tensorflow all over, but the same error keeps popping up. Maybe the problem is the environment variables as which pipreturns /usr/local/bin/pip(which is different from which python)?
I had a similar problem. Make sure that pip and python has the same path when typing which pipand which python. If they differ, change your ~.bash_profile so that the python path match the pip path, and use source ~\.bash_profile.
If that doesn't work, I would try to reinstall pip and tensorflow.
I installed pip using this command:
wget https://bootstrap.pypa.io/get-pip.py
sudo python2.7 get-pip.py
In python 2.7.9 I was trying to install bottleneck without sudo access and use its one of the functions argpartsort. But this is what happens:
import bottleneck as bn
bn.argpartsort
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'argpartsort'
I tried various methods:
pip install --user bottleneck
Requirement already satisfied (use --upgrade to upgrade): bottleneck in $HOME/.local/lib/python2.7/site-packages/Bottleneck-1.3.0.dev0-py2.7-linux-x86_64.egg
Requirement already satisfied (use --upgrade to upgrade): numpy in $HOME/.local/lib/python2.7/site-packages (from bottleneck)
Cleaning up...
I tried building from source:
python setup.py install --user
Installed $HOME/.local/lib/python2.7/site-packages/Bottleneck-1.3.0.dev0-py2.7-linux-x86_64.egg
Processing dependencies for Bottleneck==1.3.0.dev0
Searching for numpy==1.12.0
Best match: numpy 1.12.0
Adding numpy 1.12.0 to easy-install.pth file
Using $HOME/.local/lib/python2.7/site-packages
Finished processing dependencies for Bottleneck==1.3.0.dev0
I then tried:
pip install --install-option="--prefix=$HOME/.local" bottleneck
Requirement already satisfied (use --upgrade to upgrade): bottleneck in $HOME/.local/lib/python2.7/site-packages/Bottleneck-1.3.0.dev0-py2.7-linux-x86_64.egg
Requirement already satisfied (use --upgrade to upgrade): numpy in $HOME/.local/lib/python2.7/site-packages (from bottleneck)
Cleaning up...
I tried to export environment variable:
export PYTHONPATH="$HOME/.local/lib/python2.7/site-packages"
but without any luck.
How can I use:
>>> import bottleneck as bn
>>> bn.argpartsort
and get around this error:
AttributeError: 'module' object has no attribute 'argpartsort'
without sudo permissions
I am on:
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
I appreciate your help, however minimal.
Regards
There is likely nothing wrong with your install.
Check the Bottleneck 1.2.0 Release Notes:
Functions partsort and argpartsort have been renamed to partition and argpartition to match NumPy.
I need to install pantsbuild on to an Anaconda python installation of 1.7.0. This is running on CentOS 7 and the Anaconda version cannot change.
I have set the PATH so that it points to the Anaconda installation of python.
So I cloned the github repo https://github.com/twitter/commons.git and tried to run ./pants. and I get the following output
Bootstrapping pants with requirements pantsbuild.pants==0.0.33
Using /opt/anaconda/bin/python2.7
~/codes/commons/build-support ~/codes/commons
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1572k 100 1572k 0 0 1364k 0 0:00:01 0:00:01 --:--:-- 1372k
virtualenv-1.11.6/
virtualenv-1.11.6/AUTHORS.txt
virtualenv-1.11.6/bin/
virtualenv-1.11.6/bin/rebuild-script.py
virtualenv-1.11.6/docs/
virtualenv-1.11.6/docs/conf.py
virtualenv-1.11.6/docs/index.rst
virtualenv-1.11.6/docs/make.bat
virtualenv-1.11.6/docs/Makefile
virtualenv-1.11.6/docs/news.rst
virtualenv-1.11.6/docs/virtualenv.rst
virtualenv-1.11.6/LICENSE.txt
virtualenv-1.11.6/MANIFEST.in
virtualenv-1.11.6/PKG-INFO
virtualenv-1.11.6/README.rst
virtualenv-1.11.6/scripts/
virtualenv-1.11.6/scripts/virtualenv
virtualenv-1.11.6/setup.cfg
virtualenv-1.11.6/setup.py
virtualenv-1.11.6/virtualenv.egg-info/
virtualenv-1.11.6/virtualenv.egg-info/dependency_links.txt
virtualenv-1.11.6/virtualenv.egg-info/entry_points.txt
virtualenv-1.11.6/virtualenv.egg-info/not-zip-safe
virtualenv-1.11.6/virtualenv.egg-info/PKG-INFO
virtualenv-1.11.6/virtualenv.egg-info/SOURCES.txt
virtualenv-1.11.6/virtualenv.egg-info/top_level.txt
virtualenv-1.11.6/virtualenv.py
virtualenv-1.11.6/virtualenv_embedded/
virtualenv-1.11.6/virtualenv_embedded/activate.bat
virtualenv-1.11.6/virtualenv_embedded/activate.csh
virtualenv-1.11.6/virtualenv_embedded/activate.fish
virtualenv-1.11.6/virtualenv_embedded/activate.ps1
virtualenv-1.11.6/virtualenv_embedded/activate.sh
virtualenv-1.11.6/virtualenv_embedded/activate_this.py
virtualenv-1.11.6/virtualenv_embedded/deactivate.bat
virtualenv-1.11.6/virtualenv_embedded/distutils-init.py
virtualenv-1.11.6/virtualenv_embedded/distutils.cfg
virtualenv-1.11.6/virtualenv_embedded/site.py
virtualenv-1.11.6/virtualenv_support/
virtualenv-1.11.6/virtualenv_support/__init__.py
virtualenv-1.11.6/virtualenv_support/pip-1.5.6-py2.py3-none-any.whl
virtualenv-1.11.6/virtualenv_support/setuptools-3.6-py2.py3-none-any.whl
~/codes/commons
New python executable in /root/codes/commons/build-support/python/../pants.venv/bin/python2.7
Also creating executable in /root/codes/commons/build-support/python/../pants.venv/bin/python
ERROR: The executable /root/codes/commons/build-support/python/../pants.venv/bin/python2.7 is not functioning
ERROR: It thinks sys.prefix is u'/usr' (should be u'/root/codes/commons/build-support/pants.venv')
ERROR: virtualenv is not compatible with this system or executable
build-support/python/libvirtualenv.sh: line 14: /root/codes/commons/build-support/python/../pants.venv/bin/activate: No such file or directory
Requirement already satisfied (use --upgrade to upgrade): pantsbuild.pants.contrib.scrooge==0.0.33 in /opt/anaconda/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): pantsbuild.pants==0.0.33 in /root/.local/lib/python2.7/site-packages/pantsbuild.pants-0.0.33-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): twitter.common.collections>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.collections-0.3.3-py2.7.egg (from pantsbuild.pants.contrib.scrooge==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): distribute in /opt/anaconda/lib/python2.7/site-packages (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): six==1.8.0 in /root/.local/lib/python2.7/site-packages/six-1.8.0-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.dirutil>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.dirutil-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.threading>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.threading-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): requests>=2.5.0,<2.6 in /root/.local/lib/python2.7/site-packages/requests-2.5.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): psutil==1.1.3 in /root/.local/lib/python2.7/site-packages/psutil-1.1.3-py2.7-linux-x86_64.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): ansicolors==1.0.2 in /root/.local/lib/python2.7/site-packages/ansicolors-1.0.2-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): pystache==0.5.3 in /root/.local/lib/python2.7/site-packages/pystache-0.5.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): pex>=0.8.6,<0.8.999999 in /root/.local/lib/python2.7/site-packages/pex-0.8.6-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.12,<0.13 in /root/.local/lib/python2.7/site-packages/docutils-0.12-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.confluence>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.confluence-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): Markdown==2.1.1 in /root/.local/lib/python2.7/site-packages/Markdown-2.1.1-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): Pygments==1.4 in /root/.local/lib/python2.7/site-packages/Pygments-1.4-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.util>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.util-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.config>=0.3.1,<0.4 in /root/.local/lib/python2.7/site-packages/twitter.common.config-0.3.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): lockfile==0.10.2 in /root/.local/lib/python2.7/site-packages/lockfile-0.10.2-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): zincutils==0.3 in /root/.local/lib/python2.7/site-packages/zincutils-0.3-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): coverage>=3.7,<3.8 in /root/.local/lib/python2.7/site-packages/coverage-3.7.1-py2.7-linux-x86_64.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): pytest>=2.6,<2.7 in /root/.local/lib/python2.7/site-packages/pytest-2.6.4-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): pytest-cov>=1.8,<1.9 in /root/.local/lib/python2.7/site-packages/pytest_cov-1.8.1-py2.7.egg (from pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.lang==0.3.3 in /root/.local/lib/python2.7/site-packages/twitter.common.lang-0.3.3-py2.7.egg (from twitter.common.collections>=0.3.1,<0.4->pantsbuild.pants.contrib.scrooge==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.log==0.3.3 in /root/.local/lib/python2.7/site-packages/twitter.common.log-0.3.3-py2.7.egg (from twitter.common.confluence>=0.3.1,<0.4->pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.contextutil==0.3.3 in /root/.local/lib/python2.7/site-packages/twitter.common.contextutil-0.3.3-py2.7.egg (from twitter.common.util>=0.3.1,<0.4->pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.25 in /root/.local/lib/python2.7/site-packages/py-1.4.30-py2.7.egg (from pytest>=2.6,<2.7->pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): cov-core>=1.14.0 in /root/.local/lib/python2.7/site-packages/cov_core-1.15.0-py2.7.egg (from pytest-cov>=1.8,<1.9->pantsbuild.pants==0.0.33)
Requirement already satisfied (use --upgrade to upgrade): twitter.common.options==0.3.3 in /root/.local/lib/python2.7/site-packages/twitter.common.options-0.3.3-py2.7.egg (from twitter.common.log==0.3.3->twitter.common.confluence>=0.3.1,<0.4->pantsbuild.pants==0.0.33)
Cleaning up...
./pants: line 29: exec: pants: not found
I am thinking its a version conflict between virtualenv and Anaconda. I would appreciate any advice to resolve this issue.
Thanks
I would strongly recommend not running anything as root if at all possible.
The important bit of the error message is here:
ERROR: The executable /root/codes/commons/build-support/python/../pants.venv/bin/python2.7 is not functioning
ERROR: It thinks sys.prefix is u'/usr' (should be u'/root/codes/commons/build-support/pants.venv')
ERROR: virtualenv is not compatible with this system or executable
I'm not sure what's different about Anaconda Python, but some Googling does reveal that Anaconda seems to be doing some of what virtualenv does, but differently. So maybe there's a conflict? If you just try installing and running vanilla virtualenv, that might make troubleshooting easier.
I'm following this tutorial:
http://devcenter.heroku.com/articles/django
At some point I'm suposed to do:
pip freeze > requirements.txt
(Ofc. from virtualenv created instance of python)
And I get this:
(venv)przemoli#ubuntu:~/Programowanie/hellodjango$ cat requirements.txt
BeautifulSoup==3.2.0
Brlapi==0.5.5
CherryPy==3.1.2
ClientForm==0.2.10
Django==1.3
GnuPGInterface==0.3.2
PAM==0.4.2
PIL==1.1.7
Routes==1.12.3
Twisted-Core==11.0.0
Twisted-Names==11.0.0
Twisted-Web==11.0.0
WebOb==1.0.8
adium-theme-ubuntu==0.3.1
apt-xapian-index==0.44
apturl==0.5.1ubuntu1
chardet==2.0.1
command-not-found==0.2.44
configglue==1.0
cssutils==0.9.8a1
defer==1.0.2
distribute==0.6.19
django-tagging==0.3.1
dnspython==1.9.4
duplicity==0.6.15
gnome-app-install==0.4.7-nmu1ubuntu2
httplib2==0.7.2
jockey==0.9.4
keyring==0.6.2
launchpadlib==1.9.8
lazr.restfulclient==0.11.2
lazr.uri==1.0.2
louis==2.3.0
lxml==2.3
mechanize==0.1.11
nvidia-common==0.0.0
oauth==1.0.1
onboard==0.96.1
oneconf==0.2.6.7
papyon==0.5.5
pexpect==2.3
piston-mini-client==0.6
protobuf==2.4.0a
psycopg2==2.4.4
pyOpenSSL==0.12
pycrypto==2.3
pycups==1.9.59
pycurl==7.19.0
pyinotify==0.9.1
pyparsing==1.5.2
pyserial==2.5
pysmbc==1.0.10
python-apt==0.8.0ubuntu9
python-dateutil==1.4.1
python-debian==0.1.20ubuntu2
python-virtkey==0.60.0
pyxdg==0.19
sessioninstaller==0.0.0
simplejson==2.1.6
system-service==0.1.6
ubuntu-sso-client==1.4.0
ubuntuone-couch==0.3.0
ubuntuone-installer==2.0.0
ubuntuone-storage-protocol==2.0.0
ufw==0.30.1-2ubuntu1
unattended-upgrades==0.1
usb-creator==0.2.23
virtualenv==1.6.4
wadllib==1.2.0
wsgiref==0.1.2
xdiagnose==1.1
xkit==0.0.0
zope.interface==3.6.1
When deploying on heroku it fails at Brlapi .....
I see lots of stuff from my main python installation which is on ubuntu. Which is BAD since Ubuntu use python for quite a few thing itself (ubuntu-one, usb-creator, etc..).
I do not need them on heroku! I need only Django, psycopg2, and their dependencies.
I do not even know if its fault of pip, or virutalenv. (If you want to know my setup look at link above I copied it into terminal)
That is one thing that has bugged me too quite a bit. This happens when you create a virtualenv without the --no-site-packages flag.
There are a couple of things you can do:
Create virtualenv with the --no-site-packages flag.
When installing apps, dont run pip install <name> directly, instead, add the library to your requirements.txt first, and then install the requirements. This is slower but makes sure your requirements are updated.
Manually delete libraries you dont need. A rule of thumb i follow for this is to add whatever is there in my INSTALLED_APPS, and database adapters. Most other required libraries will get installed automatically because of dependencies. I know its silly, but this is what I usually end up doing.
-- Edit --
I've since written a couple of scripts to help manage this. The first runs pip freeze and adds the found library to a provided requirements file, the other, runs pip install, and then adds it to the requirements file.
function pipa() {
# Adds package to requirements file.
# Usage: pipa <package> <path to requirements file>
package_name=$1
requirements_file=$2
if [[ -z $requirements_file ]]
then
requirements_file='./requirements.txt'
fi
package_string=`pip freeze | grep -i $package_name`
current_requirements=`cat $requirements_file`
echo "$current_requirements\n$package_string" | LANG=C sort | uniq > $requirements_file
}
function pipia() {
# Installs package and adds to requirements file.
# Usage: pipia <package> <path to requirements file>
package_name=$1
requirements_file=$2
if [[ -z $requirements_file ]]
then
requirements_file='./requirements.txt'
fi
pip install $package_name
pipa $package_name $requirements_file
}
pipreqs solves the problem. It generates project-level requirement.txt file.
Install pipreqs: pip install pipreqs
Generate project-level requirement.txt file: pipreqs /path/to/your/project/
requirements file would be saved in /path/to/your/project/requirements.txt
If you care a lot about the cleanliness of your requirements.txt you should not only use the --no-site-packages option as already mentioned but also consider not to pipe the output of pip freeze directly to your requirements.txt. The reason for that is, that when doing a pip freeze not only packages specified by yourself show up, but also dependencies installed by these packages! It isn't necessary to keep them all in your requirements.txt as they will get installed automatically with the package that requires them...
So if you add a new package to your virtualenv you probably should just add the line for this package to your requirements.txt...
See this example:
(demo)[~]$ pip freeze
distribute==0.6.19
wsgiref==0.1.2
(demo)[~]$ pip install django-blog-zinnia
Downloading/unpacking django-blog-zinnia
Downloading django-blog-zinnia-0.9.tar.gz (523Kb): 523Kb downloaded
Running setup.py egg_info for package django-blog-zinnia
no previously-included directories found matching 'docs/api'
no previously-included directories found matching 'docs/build'
no previously-included directories found matching 'docs/coverage'
no previously-included directories found matching 'zinnia/media/zinnia/css/.sass-cache'
Downloading/unpacking BeautifulSoup>=3.2.0 (from django-blog-zinnia)
Downloading BeautifulSoup-3.2.1.tar.gz
Running setup.py egg_info for package BeautifulSoup
# truncated as it installs some more dependencies
Successfully installed django-blog-zinnia BeautifulSoup django-mptt django-tagging django-xmlrpc pyparsing
Cleaning up...
(demo)[~]$ pip freeze
BeautifulSoup==3.2.1
distribute==0.6.19
django-blog-zinnia==0.9
django-mptt==0.5.2
django-tagging==0.3.1
django-xmlrpc==0.1.3
pyparsing==1.5.6
wsgiref==0.1.2
(Though I should probably mentioned that in most cases it will not hurt that you have these dependencies there, just your file will grow and get harder to maintain.)
You can use:
pip freeze --local > requirement.txt
so only the packages installed locally in your virtualenv are listed in requirements.txt, not the globally-installed packages.
Simply,
pip3 freeze requirements.txt
then if you wanted to install all
pip3 install -r requirements.txt
It is bad to use pip freeze to create the requirements file... You should manage your dependencies manually!
I've created a script to fix this issue (I've already been in dependency conflict hell).