So I have a project coming up and I have to use a jupyter notebook with necessary packages in order to do so.
I have installed the necessary packages and an application(Ginsim), but python doesn't seem to detect them.
I have pasted the code block and the error below it
import ginsim
import biolqm
import maboss
import pypint
import numpy as np
import pandas as pd # for the visualization of lists of states
from colomoto_jupyter import tabulate # for fixpoint table display
from itertools import combinations # for iterating over sets
import matplotlib.pyplot as plt # for modifying plots
The error for this block is pasted below:
{
"name": "FileNotFoundError",
"message": "[WinError 2] The system cannot find the file specified",
"stack": "---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import ginsim
2 import biolqm
3 import maboss
File c:\\Users\\HP\\miniconda3\\Lib\\site-packages\\ginsim\\__init__.py:6
3 import re
4 import sys
----> 6 import biolqm
8 from colomoto_jupyter import *
9 from colomoto_jupyter.sessionfiles import new_output_file
File c:\\Users\\HP\\miniconda3\\Lib\\site-packages\\biolqm\\__init__.py:13
10 import pandas as pd
11 import numpy as np
---> 13 from ginsim.gateway import japi, restart
14 from ginsim.state import *
16 from py4j.java_gateway import JavaObject
File c:\\Users\\HP\\miniconda3\\Lib\\site-packages\\ginsim\\gateway.py:61
58 if __env:
59 module._japi_start()
---> 61 start()
62 atexit.register(stop)
File c:\\Users\\HP\\miniconda3\\Lib\\site-packages\\ginsim\\gateway.py:26, in start()
24 def start():
25 assert (not __env)
---> 26 __env[\"proc\"] = subprocess.Popen([\"GINsim\", \"-py\"], \\
27 stdout=PIPE, stdin=PIPE, stderr=PIPE)
28 port = int(__env[\"proc\"].stdout.readline().strip())
30 # start the gateway and return the entry point (GINsim's ScriptLauncher)
File c:\\Users\\HP\\miniconda3\\Lib\\subprocess.py:1026, in Popen.__init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize, process_group)
1022 if self.text_mode:
1023 self.stderr = io.TextIOWrapper(self.stderr,
1024 encoding=encoding, errors=errors)
-> 1026 self._execute_child(args, executable, preexec_fn, close_fds,
1027 pass_fds, cwd, env,
1028 startupinfo, creationflags, shell,
1029 p2cread, p2cwrite,
1030 c2pread, c2pwrite,
1031 errread, errwrite,
1032 restore_signals,
1033 gid, gids, uid, umask,
1034 start_new_session, process_group)
1035 except:
1036 # Cleanup if the child failed starting.
1037 for f in filter(None, (self.stdin, self.stdout, self.stderr)):
File c:\\Users\\HP\\miniconda3\\Lib\\subprocess.py:1538, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session, unused_process_group)
1536 # Start the process
1537 try:
-> 1538 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
1539 # no special security
1540 None, None,
1541 int(not close_fds),
1542 creationflags,
1543 env,
1544 cwd,
1545 startupinfo)
1546 finally:
1547 # Child is launched. Close the parent's copy of those pipe
1548 # handles that only the child should have open. You need
(...)
1551 # pipe will not close when the child process exits and the
1552 # ReadFile will hang.
1553 self._close_pipe_fds(p2cread, p2cwrite,
1554 c2pread, c2pwrite,
1555 errread, errwrite)
FileNotFoundError: [WinError 2] The system cannot find the file specified"
}
I would love to know what's going on and a solution to this problem. Thanks
I have tried installing all necessary packages using Conda and also the regular pip3 way and they seem to work fine.
I have pasted the conda list below for bio_env which is the environment and interpreter I'm using for VS code.
# packages in environment at C:\Users\HP\miniconda3\envs\bio_env:
#
# Name Version Build Channel
beautifulsoup4 4.12.3 pyha770c72_0 conda-forge
boolean.py 4.0 py_0 colomoto
ca-certificates 2024.9.24 haa95532_0
cffi 1.17.0 py38h4cb3324_0 conda-forge
clingo 5.7.1 py38h5e21985_1 conda-forge
colomoto_jupyter 0.8.9 py_0 colomoto
espresso-logic-minimizer 9999 0 colomoto
ginsim 3.0.0b 12 colomoto
ginsim-python 0.4.5 py_0 colomoto
intel-openmp 2024.2.1 h57928b3_1083 conda-forge
libblas 3.9.0 25_win64_mkl conda-forge
libcblas 3.9.0 25_win64_mkl conda-forge
libffi 3.4.4 hd77b12b_1
libhwloc 2.11.1 default_h8125262_1000 conda-forge
libiconv 1.17 hcfcfb64_2 conda-forge
liblapack 3.9.0 25_win64_mkl conda-forge
libxml2 2.13.5 h442d1da_0 conda-forge
libzlib 1.3.1 h2466b09_2 conda-forge
mkl 2024.2.2 h66d3029_14 conda-forge
networkx 3.1 pyhd8ed1ab_0 conda-forge
numpy 1.24.4 py38h1d91fd2_0 conda-forge
nusmv 2.6.0 0 colomoto
openjdk 22.0.1 h57928b3_1 conda-forge
openssl 3.4.0 h2466b09_0 conda-forge
pandas 2.0.3 py38hf08cf0d_1 conda-forge
pip 24.2 py38haa95532_0
pthreads-win32 2.9.1 h2466b09_4 conda-forge
py4j 0.10.9.7 pyhd8ed1ab_0 conda-forge
pycparser 2.22 pyhd8ed1ab_0 conda-forge
pydot 1.2.4 py_0 colomoto
pyparsing 3.1.4 pyhd8ed1ab_0 conda-forge
python 3.8.20 h8205438_0
python-dateutil 2.9.0 pyhd8ed1ab_0 conda-forge
python-tzdata 2024.2 pyhd8ed1ab_0 conda-forge
python_abi 3.8 2_cp38 conda-forge
pytz 2024.2 pyhd8ed1ab_0 conda-forge
setuptools 75.1.0 py38haa95532_0
six 1.16.0 pyh6c4a22f_0 conda-forge
soupsieve 2.5 pyhd8ed1ab_1 conda-forge
sqlite 3.45.3 h2bbff1b_0
symlink-exe-runtime 1.0 hcfcfb64_0 conda-forge
tbb 2021.13.0 hc790b64_0 conda-forge
ucrt 10.0.22621.0 h57928b3_1 conda-forge
vc 14.40 h2eaa2aa_1
vc14_runtime 14.42.34433 he29a5d6_23 conda-forge
vs2015_runtime 14.42.34433 hdffcdeb_23 conda-forge
wheel 0.44.0 py38haa95532_0
In VS code I did use the miniconda interpreter but it still wasn't working.
%conda install conda-forge::gensim
, and then restart the kernel before your runimport gensim
, based on here and ....