0

I install pyarrow 0.13.0 in a virtual environment on Ubuntu 16.04 using pip and it was successfully installed, but whenever I call it, I get the error below.

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
~/anaconda3/lib/python3.7/site-packages/dask/utils.py in import_required(mod_name, error_msg)
     90     try:
---> 91         return import_module(mod_name)
     92     except ImportError:

~/anaconda3/lib/python3.7/importlib/__init__.py in import_module(name, package)
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
    128 

~/anaconda3/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)

~/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)

~/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'pyarrow'

During handling of the above exception, another exception occurred:

RuntimeError                              Traceback (most recent call last)
<ipython-input-2-6c07c44edca9> in <module>
      1 df = dd.read_parquet(
      2     'sample_10percent_value_1000_only.parquet', engine='pyarrow',
----> 3     columns=['argument_0', 'func_name', 'symbol', 'location', 'script_url']
      4 )
      5 df.head()

~/anaconda3/lib/python3.7/site-packages/dask/dataframe/io/parquet.py in read_parquet(path, columns, filters, categories, index, storage_options, engine, infer_divisions)
   1141         paths = path
   1142     else:
-> 1143         read = get_engine(engine)['read']
   1144         fs, fs_token, paths = get_fs_token_paths(
   1145             path, mode='rb',

~/anaconda3/lib/python3.7/site-packages/dask/dataframe/io/parquet.py in get_engine(engine)
   1035 
   1036     elif engine == 'pyarrow':
-> 1037         pa = import_required('pyarrow', "`pyarrow` not installed")
   1038 
   1039         if LooseVersion(pa.__version__) < '0.8.0':

~/anaconda3/lib/python3.7/site-packages/dask/utils.py in import_required(mod_name, error_msg)
     91         return import_module(mod_name)
     92     except ImportError:
---> 93         raise RuntimeError(error_msg)
     94 
     95 

RuntimeError: `pyarrow` not installed `
karel
  • 5,489
  • 46
  • 45
  • 50
Stella Ella
  • 1
  • 1
  • 4
  • Please try to recreate your enviroment and post the steps to reproduce this. As it seems that you use conda, don't use virtualenv but `conda create` and `conda install` to create new environments. – Uwe L. Korn Apr 07 '19 at 08:45
  • @ Uwe L. korn I use conda to create the environment not virtualenv and I use conda to install as well before using pip but I still got the same error. – Stella Ella Apr 07 '19 at 21:43
  • please add the commands to the question. Without that giving help is nearly impossible – Uwe L. Korn Apr 09 '19 at 07:46

1 Answers1

0

did you activate/switch to the env you installed in? or are you accidentally trying to import from the base env? just a quick thought ...

# windows: 
activate env_name
# linux/mac:
source activate env_name
thePurplePython
  • 2,621
  • 1
  • 13
  • 34