I am working with Python 3.4 and have installed a package (spyder) using pip3 install. It is works as it should and I can start it from the terminal.
Since I want to switch my IDE, I tried to uninstall it using pip3 uninstall in the same way as the installation. But this gives me a message that no files can be found.
Here's my terminal output:
cord#laptop:~$ sudo pip3 freeze
Coopr==3.5.8748
...
spyder==2.3.4
...
xdiagnose==3.6.3build2
xkit==0.0.0
cord#laptop:~$ sudo pip3 uninstall spyder
Can't uninstall 'spyder'. No files were found to uninstall.
My OS is Ubuntu 14.04 x64.
Any hints?
Go to /usr/local/bin and find the packages you want to delete
Then just use sudo rm -r spyder or whatever the directory name is.
That way the files get manually removed from your system.
Related
I'm new to macos and trying to get a dev environment going...I need pip but getting an error message with just pip.
Getting error pkg_resources.DistributionNotFound: The 'pip==20.0.2' distribution was not found and is required by the application
Python3 was installed with macos and I tried to install 2.x version and made it the global default. I think that's why I'm getting the above error.
I uninstalled the 2.x python using pyenv.
How can I remove pip (i've got pip, pip3 and pip 3.8) and start over.
Thanks.
Can you try removing pip using this in the directory where pip pacakge is installed?
sudo rm -r pip <Version Number>
You can get the directory where pip is installed with this: which pip and then cd into that path and run the above command.
I am wanting to install a pip package on Debian but when I install it using
pip install bitmex-market-maker
or
pip install --user bitmex-market-maker
it doesn't work and gives me
-bash: marketmaker: command not found
error here
it works fine on my MacBook
I tried to reinstall reboot and even tried pip3 to no avail.
To run the libraries you first need to be inside the python environment.
At your terminal try:
python -m marketmaker
I think I broke my pip after desperately trying to uninstall Python3.7. (I am on a Mac)
I removed the python folder from the application, removed /Library/Frameworks/Python.framework and removed the folders from /usr/local/bin according to https://osxuninstaller.com/uninstall-guides/properly-uninstall-python-mac/. I then installed python3.6.
src$ pip3.6 --version pip 9.0.1 from
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
(python 3.6)
but pip itself does no longer work.
src$ which pip
/usr/local/bin/pip
src$ pip --version
-bash: /Library/Frameworks/Python.framework/Versions/3.7/bin/pip: No such file or directory $
It still references the python 3.7 folder. How can I unlink that reference? THe same is btw. true for the package virtualenv that I installed. I can install it with pip3.6 but calling virtualenv still references to the framework folder of 3.7
You need to install pip in that environment. i.e 3.7.
Reason is when you deleted the default install you deleted the dependencies/ libraries that came with it.
Easiest way is to install python afresh via homebrew if you have it.
brew install python
Alternatively you can follow the instructions here to download a file to install pip securely. Homebrew can become messy when managing python environments. I'd recommend looking at something like anaconda if you are going to using different python versions with their own dependencies etc.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py
Other options for fresh install are described in answer here. Hope that helps.
How do I install pip on macOS or OS X?
I am having Anaconda3 and Python3.4. But when i run easy_install, packges get installed in Anaconda3\Lib\site-packages and I want to do it for C:\Python34\Lib\site-packages. How to do it?
Open Command prompt
Go to Python34/Scripts
cd C://Python34//Scripts
Install your packages using pip
pip install yourpackegeName
I am trying to get a nice clean Python environment setup on OSX 10.9. I've installed Python with Homebrew and set my PATH variables so...
> which python
/usr/local/bin/python
and
> which pip
/usr/local/bin/pip
so when I look at my /usr/local/bin :
pip -> ../Cellar/python/2.7.6/bin/pip
python -> ../Cellar/python/2.7.6/bin/python
then when I run:
> pip install virtualenv
I get permission errors on /usr/local/bin/virtualenv:
...
running install_scripts
Installing virtualenv script to /usr/local/bin
error: /usr/local/bin/virtualenv: Permission denied
I thought that by using Homebrew I could use pip and avoid using sudo to install virtualenv. Am I doing something wrong here?
Ok! I managed to fix this myself.
I deleted all the virtualenv related things from /usr/local/bin (they had been installed under root for some reason and this was causing my permission issues.).
Then I did a pip uninstall virtualenv to get rid of other instances of virtualenv, as there was still one in /usr/local/lib/python2.7/site-packages/
Then a simple pip install virtualenv and things work fine now!
Most likely HomeBrew does some magic so that running brew install allows writing to /usr/local/bin, but this privilege is not available to normal commands. This is a guess, I didn't investigate this further.
Install virtualenv with brew:
brew install pyenv-virtualenv
This command:
pip install virtualenv
runs pip from your first directory from $PATH environment variable, which is usually system wide, thus when you run in this way - you are trying to install it globall.
You should install you your environment in your $HOME directory:
virtualenv $HOME/myvirpython
and later:
$HOME/myvirpython/bin pip install something
Additionally you should read this:
https://docs.brew.sh/Homebrew-and-Python