pip won't show my installed packages.
I did
brew install python
sudo -E pip install virtualenv
pip list
pip (1.5.6)
setuptools (5.4.2)
wsgiref (0.1.2)
Why isn't pip showing virtualenv?
This pip is the version installed by brew.
When I installed python, it says:
They will install into the site-package directory
/usr/local/lib/python2.7/site-packages
Looking in this directory, virtualenv is not there.
Doing an updatedb; locate virtualenv, I find it installed here:
/lib/python2.7/site-packages/
What gives? Pip installs to above location, but isn't aware of it when I do pip list!
EDIT: In response to #jordanm's comment,
sudo -E pip install virtualenv
Password:
Downloading/unpacking virtualenv
Downloading virtualenv-1.11.6-py2.py3-none-any.whl (1.6MB): 1.6MB downloaded
Installing collected packages: virtualenv
Successfully installed virtualenv
Cleaning up...
sudo -E pip install virtualenv most likely installs virtualenv to OSX provided system-wide Python installation, not Homebrew installed Python.
Try:
brew install pyenv-virtualenv
instead.
Related
I'm sorry if this is a repeat question, but whenever I search force uninstall of pip I get something like a pip uninstall command. What I want is a way to uninstall the package pip (and reinstall). when I run python3 -m pip uninstall pip setuptools in a conda enviroment I get this error:
Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Found existing installation: setuptools 45.2.0
Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'setuptools'. No files were found to uninstall.
I also get the same error in the base enviroment when I run /usr/lib/python3 -m pip uninstall pip setuptools.
However when I'm outside of a virtual enviroment (base) and I just run python3 -m pip uninstall pip setuptools, I get:
/home/cameron/anaconda3/bin/python3: No module named pip
I could just remove the file but I want to avoid if that would be problematic.
The problematic thing is I can still install things with pip in my base enviroment but I can't call python programs in my virtual enviroments anymore nor install new ones with pip (perhaps able to with conda) since it defaults to the packages installed with this pip even in a venv.
this should remove pip from your active conda environment
conda uninstall pip --force
I was finally able to remove with sudo apt-get purge python3-pip
First, I run
pip install virtualenv
and later, I run
pip install --user virtualenv
So, this is what I have now
$ which -a virtualenv
/Users/admin/.local/bin/virtualenv
/usr/local/bin/virtualenv
This is my default virtualenv
/Users/admin/.local/bin/virtualenv
Now I want to uninstall, this,
/usr/local/bin/virtualenv
What should I do?
Thanks!
I tried
pip uninstall virtualenv
It removed /usr/local/bin/virtualenv, the system wide package.
The package I installed using --user flag, which cannot be uninstalled.
I just manually removed the folder.
See this thread.
How to uninstall a package installed with pip install --user
I want to install PyInstaller package through pip, So I typed "pip install pyinstaller", but it occur errors
and I was trying to upgrade the alt graph to latest version.. but it occur same errors
how can I install the PyInstaller or how can I upgrade the package altgraph ?
Therefore, even I can't delete altgraph using
rm -rf /System/Library/Frameworks/Python.framework/.../altgraph
What I did in terminal
pip install pyinstall - not working
pip install --upgrade altgraph - not working
pip uninstall altgraph - not working
I found a solution from
http://marcelog.github.io/articles/mac_osx_python_pip_install_operation_not_permitted.html
install package under a user
pip install <package> --user
What's the difference between
pip install pkg_name and
pip install -U pkg_name?
Does it automatically install the dependencies too or something?
If we do pip install -h we see:
-U, --upgrade Upgrade all specified packages to the newest
available version.
So it upgrades the packages you specify (they can be already installed)
I'm using Django 1.3 with Python 2.7 in Ubuntu.
Trying to install django-grappelli with pip
$ pip install django-grappelli
It apparently installs for Python 2.6 (the distribution version)
Requirement already satisfied: django-grappelli in /usr/local/lib/python2.6/dist-packages
Maybe because I installed pip with apt-get ?
How can I install grappelli for my Python 2.7 ?
Python 2.7 packages should be in a different place then Python 2.6 packages. For you then /usr/local/lib/python2.7/site-packages/ I think.
You can tell PIP to install into specific location by:
pip install --install-option="--prefix=/usr/local/lib/python2.7/site-packages/" django-grapelli
You can also use version specific commands to do the installation.
pip-2.7 install django-grapelli
If pip-2.7 command is not found use easy_install-2.7 to install pip.
I have installed pip with Synaptic so it has been installed for the repos python version (2.6).
To correct this problem I had to uninstall pip with Synaptic and install it with easy_install
$ sudo apt-get --purge remove python-pip
$ sudo easy_install pip
$ sudo pip install django-grappelli