Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
48 Views

Error in Installing Intel DAAL for Python in Linux

Hello all

I am getting following error while installing : 

abhi@ubuntu:/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_sources$ python setup.py install
running install
error: can't create or remove files in install directory
 
The following error occurred while trying to add or remove files in the
installation directory:
 
    [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-12218.write-test'
 
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
 
    /usr/local/lib/python2.7/dist-packages/
 
Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
 
For information on other options, you may wish to consult the
documentation at:
 
 
Please make the appropriate changes for your system and try again.
 
When I use sudo, I am getting this error. I have ownership and proper permissions for /opt/intel...., still I am getting error. What could be possibly wrong?
 
abhi@ubuntu:/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_sources$ sudo python setup.py install
Traceback (most recent call last):
  File "setup.py", line 66, in <module>
    daal_root=os.environ['DAALROOT']
  File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'DAALROOT'

 

Please help!

0 Kudos
5 Replies
Highlighted
Beginner
48 Views

Hi all

When I am login in as root and try to compile, I am able to compile for around 45 mins and then I get following error:

In file included from daal/wrp/_data_management__db.cpp:3422:0:
/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/include/data_management/data_source/mysql_feature_manager.h:61:17: fatal error: sql.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

 

I have already installed package for sql:

root@ubuntu:/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_sources# apt install libmysqlclient-dev

 

Could you please help !

Thanks

0 Kudos
Highlighted
48 Views

Hello!

about first problem ("python setup.py install" under user abhi). You are trying to build and install daal python module. By default, at install stage built module is trying to be written to python folder. user abhi has no writing permissions for it. In such cases I do following:

1) do python module build only

2) before run application which is used this module, I set up PYTHONPATH variable. In your case it will be something like this:

export PYTHONPATH=/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_source/build/lib.linux-x86_64-3.6:/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_source/build/lib.linux-x86_64-3.6/daal

 

Second problem ("python setup.py install" under user abhi). I believe that it was described in neighboring thread.

Third problem. You need to install odbc driver dev package. I`m not an expert in ubuntu, but according to the thread at stackowerflow (https://stackoverflow.com/questions/15447386/sql-h-header-file-missing-though-unixodbc-is-installed) it is unixodbc-dev. So, do

sudo apt-get install unixodbc-dev

Andrey

dr_pain
0 Kudos
Highlighted
Beginner
48 Views

Hey Andrey

Thank you for reply.

What possible problem I could get If i try to execute by becoming super user. Actually I am able to get the result the result now, but I did that after I become "root". Would That cause any problem or I shall choose your way to export PATH ?

Please suggest. Thank you

0 Kudos
Highlighted
48 Views

Hello!

> I shall choose your way to export PATH ?

not PATH, but PYTHONPATH.

I see "security" problems only. If somebody else will use this server, he will be able to access pydaal module.

Additionally, you python distribution will not be "clean". You may meet problems if you will transfer you python application (which depend on pydaal) to another server - python at that server will not contain pydaal and your application will fail.

It is up on you to decide - are this problems or not.

Andrey

dr_pain
0 Kudos
Beginner
48 Views

Hi

If I am not using root and trying with user "abhi", I am still getting the same error:

abhi@ubuntu:/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_sources$ ls
build  daal  dist  pydaal.egg-info  setup.py
 
abhi@ubuntu:/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_sources$ export PYTHONPATH=/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_source/build/lib.linux-x86_64-3.6:/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_source/build/lib.linux-x86_64-3.6/daal
 
abhi@ubuntu:/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_sources$ /usr/bin/python2.7 setup.py install
running install
error: can't create or remove files in install directory
 
The following error occurred while trying to add or remove files in the
installation directory:
 
    [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/test-easy-install-13551.write-test'
 
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
 
    /usr/local/lib/python2.7/dist-packages/
 
Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
 
If I use sudo:
abhi@ubuntu:/opt/intel/compilers_and_libraries_2018.2.199/linux/daal/pydaal_sources$ sudo /usr/bin/python2.7 setup.py installTraceback (most recent call last):
  File "setup.py", line 66, in <module>
    daal_root=os.environ['DAALROOT']
  File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'DAALROOT'

 

Where I am going wrong ?

0 Kudos