-
Notifications
You must be signed in to change notification settings - Fork 11.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: No module named 'pycocotools' #6
Comments
Cloning https://github.com/waleedka/coco (which is @waleedka's fork of the coco API), then running
installed pycocotools to site-packages and resolved the import error. |
The package
|
git clone https://github.com/pdollar/coco.git cd coco/PythonAPI before doing above steps install cython |
Updated the README file to include installation instructions for pycocotools. Thanks @philferriere |
thanks! |
On
I am using python 3.6 and I have both cython and h5py, any ideas why this is happening??
|
I fixed the issue above by linking python in the Makefile with my conda python:
|
I fixed this way:
|
@utahman Same, but with the command |
Hello All, When i try to run Does anyone know how to get around this issue? I am avoiding make install because I am not familiar with make and I don't want to accidentally install things outside of my conda environment. --- Update --- install: and then i run the following commands: Then I see pycocotools in my site-package: However, I still get the ModuleNotFoundError: No module named 'pycocotools' ---Fixed--- run 'conda install notebook' in the env and jupyter notebook again Thanks, |
The solution suggested by @G-mel works like a charm in UbuntuGnome 16.04, Python 3.6 and it directly installs it to |
The easiest way I found and it has worked for me on Mac, Ubuntu and Windows:
The full installation steps that I use with conda on Python 3.6 (tested this on Ubuntu 18.04 only):
|
Thanks @philferriere. The pip install hosted on github repo worked well! |
@pirahagvp I use cocotools, and I meet the following problems. Traceback (most recent call last): |
Hello...I am trying to install this and getting following error.. I have MS Visual Studio Build Tools 2017 installed. F:\Amit\download\coco-master\coco-master\PythonAPI>python setup.py install
|
As @waleedka implicitly mentioned in his comment from Jun 5, the URL of the git repo recently changed.
I found it useful to add the #egg string when installing the package from github:
|
I have followed following steps:
|
This is the second time I am trying to install cocotools. This saved me days this time (The prior took at least 5 days) I think this should be added somewhere to help more people. Thanks a lot! |
now easy way
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-j5hm4oy3/pycocotools/ pip install Cython |
I didn't figure it out using all the above methods, but the following one:
|
Anybody ran into the same problem. Tried all the suggestions above. Collecting pycocotools
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-895bapp3/pycocotools/ |
@philferriere when i tried to how can i fix this? |
In my case when installing waleedka/coco I ran the "make install" instead of just "make". Then it wokred. So local installation requires some additional steps I guess |
Hi all! |
@
Oky so i clone the repo, then install the setup.py now what. what am i suppose to do next? |
I am facing the same issue. Is cocoAPI not supported by Python 3? |
Just download cocoAPI... You can find cocapi on github. https://github.com/cocodataset/cocoapi Then go to the directory of cocoapi where setup.py is. Then run the command if you see an output like this its a success. |
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/ Is there another way :( ? |
Download microsoft visual 14.0 and its build tools. And then you are good
to go.
…On Mon, 28 Oct 2019, 11:04 PM BilalSaeedLM10, ***@***.***> wrote:
after following your instructions, this is where I am at:
error: Unable to find vcvarsall.bat.
Any Ideas now ?
Just download cocoAPI... You can find cocapi on github.
https://github.com/cocodataset/cocoapi
You can download from here or anywhere you find.
Then go to the directory of cocoapi where setup.py is. Then run the command
python setup.py build_ext --inplace
if you see an output like this its a success.
running build_ext
copying build\lib.win-amd64-3.7\pycocotools_mask.cp37-win_amd64.pyd - >
pycocotools
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft
Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
Is there another way :( ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6?email_source=notifications&email_token=AIFUT5A6FUG2JULS26NAH4DQQ4STXA5CNFSM4EB7VEXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECN3AZY#issuecomment-547074151>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIFUT5GWQAZFWTSJUDOVKH3QQ4STXANCNFSM4EB7VEXA>
.
|
may just install pycocotools with using pip. |
pip install pycocotools |
现在使用如下方式可以解决了
|
pip search pycocotools |
apres avoir excuter cette cmd python setup.py build_ext --inplace |
Bonjour j'ai executer cette cmd python setup.py build_ext --inplace |
i have error when i make this cmd "pip install git+https://github.com/waleedka/coco.git#subdirectory=PythonAPI" git+ not found |
do you found a solution i have same error |
ValueError: 'pycocotools/_mask.pyx' doesn't match any files |
however, I'd use |
Thanks this worked for me. However, I first had to fix an error resulting from |
Thanks! Just in case you face "pycocotools/_mask.c:4:20: fatal error: Python.h: No such file or directory |
you can solve this issues by this way |
This was not me. Please inspect the IP address for installation.
Thanks & Regards
LeeAnn Christine Clark
6155467616
…On Tue, Oct 13, 2020, 9:25 PM sudonto ***@***.***> wrote:
git clone https://github.com/pdollar/coco.git
cd coco/PythonAPI
make
sudo make install
sudo python setup.py install
before doing above steps install cython
Thanks! Just in case you face "pycocotools/_mask.c:4:20: fatal error:
Python.h: No such file or directory
compilation terminated.", please issue apt-get install python3.6-dev
(according to [this])(cocodataset/cocoapi#180
<cocodataset/cocoapi#180>)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANAVPCIV5Q34PAOFYHGW4SDSKUD2PANCNFSM4EB7VEXA>
.
|
#For Windows |
thanks, man. It works for me. windows users can use this command. |
Worked for me, I guess CPython was not installed in my system. |
The following commands work for me in a conda environment on Ubuntu 18.04:
|
In my case i have Windows and I just run the follow command: |
ok |
This command has worked for me and I'm using Linux Mint 21 as my os. |
I am using miniconda3 and this command worked: The alternative are also mentioned here: |
Thanks a lot
I am having the following error
"ImportError: No module named 'pycocotools'"
Can you please advice me how to install it as I could not find it on pip or conda?
I tried the installation from https://github.com/cocodataset/cocoapi but did not work too
The text was updated successfully, but these errors were encountered: