pythonpipbluejeans

How to pip uninstall a package installed using a git project URL?


I've tried following the installation instructions for the BlueJeans meetings REST API (https://github.com/bluejeans/api-rest-meetings/tree/master/libs/python), using the command

pip install git+https://github.com/bluejeans/api-rest-meetings.git@pip-repo

The pip freeze command confirms that I've installed it:

Kurts-MacBook-Pro-2:~ kurtpeek$ pip freeze
BlueJeansMeetingsRestApi==1.0.0
certifi==2018.4.16
python-dateutil==2.7.3
six==1.11.0
urllib3==1.23

However, in the iPython shell, I'm unable to import BlueJeansMeetingsRestApi:

Kurts-MacBook-Pro-2:~ kurtpeek$ ipython
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import BlueJeansMeetingsRestApi
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-0891de0c20ce> in <module>()
----> 1 import BlueJeansMeetingsRestApi

ModuleNotFoundError: No module named 'BlueJeansMeetingsRestApi'

This is in my local environment, but I've also installed it in a Pipenv environment, in which case I was required to provide an egg, which I did by appending #egg=BlueJeansMeetingsRestApi to the Git project URL. If I do this straight away, I get 'requirement already satisfied':

Kurts-MacBook-Pro-2:~ kurtpeek$ pip install git+https://github.com/bluejeans/api-rest-meetings.git@pip-repo#egg=BlueJeansMeetingsRestApi
Requirement already satisfied: BlueJeansMeetingsRestApi from git+https://github.com/bluejeans/api-rest-meetings.git@pip-repo#egg=BlueJeansMeetingsRestApi in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (1.0.0)
Requirement already satisfied: urllib3>=1.15 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from BlueJeansMeetingsRestApi) (1.23)
Requirement already satisfied: six>=1.10 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from BlueJeansMeetingsRestApi) (1.11.0)
Requirement already satisfied: certifi in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from BlueJeansMeetingsRestApi) (2018.4.16)
Requirement already satisfied: python-dateutil in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from BlueJeansMeetingsRestApi) (2.7.3)

Therefore, I'd like to try to first uninstall BlueJeans and re-install it specifying the egg. However, if I try to uninstall it with the same project URL, I get the following error:

Kurts-MacBook-Pro-2:~ kurtpeek$ pip uninstall git+https://github.com/bluejeans/api-rest-meetings.git@pip-repo
You must give at least one requirement to uninstall (see "pip help uninstall")

By the way, I'm using Python 3.7.0 (pip is an alias for pip3).

I have two questions:

  1. Why is import BlueJeansMeetingsRestApi not working in the first place?
  2. How can I uninstall it?

Solution

  • To uninstall a package just use

    pip uninstall BlueJeansMeetingsRestApi
    

    if there is some configuration issue with IPYTHON you can encounter such errors.

    But if you are running short for time, i would suggest got with direct python shell command shell by using,i think this should work when you try import it into a file.

    python <filename>.py
    

    please check and let me know.