Closed dchou1618 closed 2 years ago
Hi,
Thanks for trying it out. Can you please make sure that you are not running from xclib/pyxclib directory after installation.
Hi @kunaldahiya. Yes, I realized that yesterday and it works haha.
Hi @kunaldahiya I'm facing the same issue. Though I've run the command python3 setup.py install --user
and I'm executing the code from pyxclib directory and not from xclib one.
I faced this while trying to run sparse_bow_features_from_raw_data.py file
Can you please try running it from somewhere else? Python will try to import from local files in this case.
Thanks for replying so quickly :) I'll try it out
Hi @kunaldahiya I'm still running into an error ImportError: cannot import name 'VectorizerMixin'
Sorry for troubling you 😅
This is the Traceback:
Traceback (most recent call last):
File ".\sparse_bow_features_from_raw_data.py", line 6, in
All my other packages are in the location "c:\users\tarushi_sharma\appdata\local\programs\python\python36\lib\site-packages"
Also, I don't know if it would matter but I used to work on Linux earlier but since my system recently crashed, I shifted to Windows
Hi everyone!!
I'm getting the same problem:
###################################################################
runcell(0, '/home/elaine/Documents/datasets_xmlc.py')
Traceback (most recent call last):
File "/home/elaine/Documents/datasets_xmlc.py", line 9, in
How can I fix it?! I'm not well proficient in python as well. My file is in the /home/elaine/Documents/ folder and the package is installed at the /home/elaine/ folder.
Thanks
Can you please check if the notebook is using the same python version as used by xclib? It seems like (jupyter?) notebook is not detecting the installed library.
Hi Kunal
I'm using Spyder IDE. But I will check and return to you. I'm not at home right now.
Thanks for now
Enviado do smartphone!
On Wed, Dec 8, 2021, 13:17 Kunal Dahiya @.***> wrote:
Can you please check if the notebook is using the same python version as used by xclib? It seems like (jupyter?) notebook is not detecting the installed library.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kunaldahiya/pyxclib/issues/11#issuecomment-988959147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7DF5LXBSKFZRY3PVNPBDDUP6AH3ANCNFSM4X7GZOAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Can you please check if the notebook is using the same python version as used by xclib? It seems like (jupyter?) notebook is not detecting the installed library.
Kunal!!! Please, can you tell me what is the version of python you used? My laptop configurations:
################################### elaine@bionote:~$ which python /usr/bin/python
elaine@bionote:~$ which python3 /usr/bin/python3
elaine@bionote:~$ python Python 2.7.18 (default, Mar 8 2021, 13:02:45) [GCC 9.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information.
elaine@bionote:~$ python3 Python 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
elaine@bionote:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal ###################################
When I went out after sending a message to you, I power off my laptop. Then, when I came back I power on it. It seems that a restart helped with some issues because now I'm getting other errors:
##############################################################################################
runcell(0, '/home/elaine/Documents/datasets_xmlc.py')
Traceback (most recent call last):
File "/home/elaine/Documents/datasets_xmlc.py", line 13, in
I believe that now is an issue about the folder where is my train.txt and the permissions for the file. So, I really don't know what exactly happened that fixed the problem. Do you have any idea? I hope that this can help others.
Thanks a lot!
HI
I'm getting new errors from this line
labels = data_utils.read_sparse_file('/home/elaine/Documents/Xf.txt', header=True)
################################################## Traceback (most recent call last):
File "/tmp/ipykernel_5595/4045602250.py", line 1, in
File "/home/elaine/.local/lib/python3.8/site-packages/xclib-0.97-py3.8-linux-x86_64.egg/xclib/data/data_utils.py", line 243, in read_sparse_file query_values, _header_shape = _read_file_safe(file,
File "/home/elaine/.local/lib/python3.8/site-packages/xclib-0.97-py3.8-linux-x86_64.egg/xclib/utils/sparse.py", line 238, in _read_file_safe f, _header_shape = _handle_header(f, header)
File "/home/elaine/.local/lib/python3.8/site-packages/xclib-0.97-py3.8-linux-x86_64.egg/xclib/utils/sparse.py", line 228, in _handle_header num_cols, num_rows = map(
ValueError: invalid literal for int() with base 10: '0%' ####################################################################################################
What to do? Thanks
Hi
'read_data' is meant to read files in the following format (containing features and the labels). You can download the EURLex-4K dataset.
2 4 5
1,2 0:0.5 1:0.4 2: 0.3
2,3,4 1:0.5 2:0.4 3:0.8
'read_sparse_file' is meant to read files like the following (only features are available)
2 4
0:0.5 1:0.4 2:0.3
2:0.4 3:0.3
I'm running into the above issue when running
from xclib.data import data_utils