{
  "id": 409206,
  "title": "how to use venv in Kaggle",
  "url": "/competitions/cafa-5-protein-function-prediction/discussion/409206",
  "author_name": "Richard1st",
  "post_date": "2023-05-10T03:02:48.724000",
  "votes": 4,
  "comment_count": 0,
  "views": 0,
  "content": "<p>hi,<br>\nwhen i want to use the networkx to draw the graph, it popped up an error of <br>\n*File /opt/conda/lib/python3.10/site-packages/networkx/convert_matrix.py:579, in to_scipy_sparse_array(G, nodelist, dtype, weight, format)<br>\n    576     row, col, data = [], [], []<br>\n    578 if G.is_directed():<br>\n--&gt; 579     A = sp.sparse.coo_array((data, (row, col)), shape=(nlen, nlen), dtype=dtype)<br>\n    580 else:<br>\n    581     # symmetrize matrix<br>\n    582     d = data + data</p>\n<p>AttributeError: module 'scipy.sparse' has no attribute 'coo_array'*</p>\n<p>And  this error is caused by the version incompatible, and it seems that it may cause more serious issue to use ! pip install --upgrade, and it recommanded to use the venv.</p>\n<p>but i don't know how to trigger the venv on Kaggle.</p>",
  "messages": [
    {
      "id": 2253212,
      "postDate": "2023-05-10T03:02:48.723Z",
      "content": "<p>hi,<br>\nwhen i want to use the networkx to draw the graph, it popped up an error of <br>\n*File /opt/conda/lib/python3.10/site-packages/networkx/convert_matrix.py:579, in to_scipy_sparse_array(G, nodelist, dtype, weight, format)<br>\n    576     row, col, data = [], [], []<br>\n    578 if G.is_directed():<br>\n--&gt; 579     A = sp.sparse.coo_array((data, (row, col)), shape=(nlen, nlen), dtype=dtype)<br>\n    580 else:<br>\n    581     # symmetrize matrix<br>\n    582     d = data + data</p>\n<p>AttributeError: module 'scipy.sparse' has no attribute 'coo_array'*</p>\n<p>And  this error is caused by the version incompatible, and it seems that it may cause more serious issue to use ! pip install --upgrade, and it recommanded to use the venv.</p>\n<p>but i don't know how to trigger the venv on Kaggle.</p>",
      "rawMarkdown": "hi,\nwhen i want to use the networkx to draw the graph, it popped up an error of \n*File /opt/conda/lib/python3.10/site-packages/networkx/convert_matrix.py:579, in to_scipy_sparse_array(G, nodelist, dtype, weight, format)\n    576     row, col, data = [], [], []\n    578 if G.is_directed():\n--> 579     A = sp.sparse.coo_array((data, (row, col)), shape=(nlen, nlen), dtype=dtype)\n    580 else:\n    581     # symmetrize matrix\n    582     d = data + data\n\nAttributeError: module 'scipy.sparse' has no attribute 'coo_array'*\n\nAnd  this error is caused by the version incompatible, and it seems that it may cause more serious issue to use ! pip install --upgrade, and it recommanded to use the venv.\n\nbut i don't know how to trigger the venv on Kaggle.",
      "votes": 4
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2253212": "hi,\nwhen i want to use the networkx to draw the graph, it popped up an error of \n*File /opt/conda/lib/python3.10/site-packages/networkx/convert_matrix.py:579, in to_scipy_sparse_array(G, nodelist, dtype, weight, format)\n    576     row, col, data = [], [], []\n    578 if G.is_directed():\n--> 579     A = sp.sparse.coo_array((data, (row, col)), shape=(nlen, nlen), dtype=dtype)\n    580 else:\n    581     # symmetrize matrix\n    582     d = data + data\n\nAttributeError: module 'scipy.sparse' has no attribute 'coo_array'*\n\nAnd  this error is caused by the version incompatible, and it seems that it may cause more serious issue to use ! pip install --upgrade, and it recommanded to use the venv.\n\nbut i don't know how to trigger the venv on Kaggle."
  }
}