Reputation: 19
I am trying to install CTC-Decode on a Windows machine. I am executing the following code in Git Bash:
git clone --recursive https://github.com/parlance/ctcdecode.git
cd ctcdecode && pip install .
I get the following error:
ERROR: Could not install packages due to an EnvironmentError:[(
'C:\\Users\\vtz\\ctcdecode\\third_party\\boost_1_67_0\\libs\\geometry\\doc\\html\\geometry\\reference\\spatial_indexes\\boost__geometry__index__rtree\\rtree_parameters_type_const____indexable_getter_const____value_equal_const____allocator_type_const___.html',
'C:\\Users\\vtz\\AppData\\Local\\Temp\\pip-req-build-tb4918ru\\third_party\\boost_1_67_0\\libs\\geometry\\doc\\html\\geometry\\reference\\spatial_indexes\\boost__geometry__index__rtree\\rtree_parameters_type_const____indexable_getter_const____value_equal_const____allocator_type_const___.html',
"[Errno 2] No such file or directory: 'C:\\\\Users\\\\vtz\\\\AppData\\\\Local\\\\Temp\\\\pip-req-build-tb4918ru\\\\third_party\\\\boost_1_67_0\\\\libs\\\\geometry\\\\doc\\\\html\\\\geometry\\\\reference\\\\spatial_indexes\\\\boost__geometry__index__rtree\\\\rtree_parameters_type_const____indexable_getter_const____value_equal_const____allocator_type_const___.html'"
)]
Upvotes: 1
Views: 4278
Reputation: 51
Below is worked for me in google colab:
git clone --recursive https://github.com/parlance/ctcdecode.git ;
cd ./ctcdecode/
\pip install wget
\python setup.py install
Now you can import ctcdecode
without an error
Upvotes: 0
Reputation: 11
This worked for me:
import os
os.system('git clone --recursive https://github.com/parlance/ctcdecode.git')
os.system('cd ctcdecode && pip install .')
Upvotes: 1
Reputation: 6687
I had a similar issue installing via pip
, but unlike you, the local installation worked in my case. I've added my approach in this related GH issue (I'm copypasting it also below for consistency).
I recognize that this is more of a troubleshooter than a specific answer to your problem. The reason is that the installation script has several hardcoded values, and they may vary greatly among different setups. In fact, if you look at the issue above, many different users have different problems, but all likely stem from the same problem with hardcoded values.
For this reason I'm not sure if it's possible to tell which exact combination works for a given setup without knowing many details about system, dependencies, etc, so hopefully this helps anyone to navigate the issue and find a combination that works. feel free to share it if you manage to make it work, it could be a nice addition to the repo.
Cheers!
Andres
In my case (Ubuntu 20.04, Python3.7, torch 1.8), pip install also failed but cloning and calling the pip install . inside the repo worked.
To add something to the discussion, you may be interested in checking the setup.py file in this repo, which is basically the installation script.
In it, several compressed libraries are downloaded from here and installed. A possible fix for your problems could be to replace those with other versions more compatible with your setup.
Then the libraries are compiled using a g++ command that you can also find inside setup.py. Another possible fix could be to adapt that command to your setup.
Upvotes: 0