Reputation: 5646
I need to install pycocotools
under Linux. Here it says that I can do that with
pip install git+https://github.com/waleedka/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI
However, when I execute the above command (from a virtual environment my_env
), I get this answer:
(my_venv) ...:~/Mask_RCNN$ pip install git+https://github.com/waleedka/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI
[1] 22087
(my_venv) ....:~/Mask_RCNN$ Collecting pycocotools from git+https://github.com/waleedka/cocoapi.git#egg=pycocotools
Cloning https://github.com/waleedka/cocoapi.git to /tmp/pip-build-qo_7ubcm/pycocotools
Username for 'https://github.com':
At this point, since git
is prompting me for a username, I use my GitHub username, but from the answer I guess it was looking for the username (and password?) of the repository owner:
MyUserName
MyUserName: command not found
[1]+ Stopped pip install git+https://github.com/waleedka/cocoapi.git#egg=pycocotools
[1]+ Stopped pip install git+https://github.com/waleedka/cocoapi.git#egg=pycocotools
The installation failed. Also, apparently now I have a hanging background job:
ps
PID TTY TIME CMD
20079 pts/0 00:00:00 bash
22087 pts/0 00:00:00 pip
22094 pts/0 00:00:00 git
22095 pts/0 00:00:00 git-remote-http
22390 pts/0 00:00:00 ps
How can I install the correct branch of pycocotools
?
Upvotes: 0
Views: 201
Reputation: 8500
My suggestion is that you need to use quotes '
to handle the ampersand &
operator that is in this part of the command: &subdirectory=PythonAPI
.
Also it seems that repository https://github.com/waleedka/cocoapi/ was moved to https://github.com/waleedka/coco/
So, I tried this command, and it doesn't require authentication from me, but failed because I don't have Cython installed:
sanyash@sanyash-ub16:~$ pip3 install 'git+https://github.com/waleedka/coco.git#egg=pycocotools&subdirectory=PythonAPI'
Collecting pycocotools from git+https://github.com/waleedka/coco.git#egg=pycocotools&subdirectory=PythonAPI
Cloning https://github.com/waleedka/coco.git to ./pip-build-2pxyynzt/pycocotools
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-2pxyynzt/pycocotools/PythonAPI/setup.py", line 2, in <module>
from Cython.Build import cythonize
ImportError: No module named 'Cython'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2pxyynzt/pycocotools/PythonAPI
Despite I can't show you the full succsessful installation of pycocotools
, hope my answer will help you.
Upvotes: 2