Open SND8041 opened 6 years ago
Please check your version of pip. I have no idea about Windows, but on my computer:
... $ pip -V
pip 10.0.1 from /home/ ... /python2.7/site-packages/pip (python 2.7)
If your version of pip is 10, then please note that pip doesn't support main anymore. A quick fix is to downgrade your pip version to 9.0.3 (See here for details, here for solution)
To do this, execute the following command (or it's Windows equivalent)
$ python -m pip install --upgrade pip==9.0.3
Collecting pip==9.0.3
.
.
.
Successfully installed pip-9.0.3
**You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.**
Ignore the warning at the end.
To ensure that this will work, the pip version check must tell you that pip has been rolled back to 9.0.3:
$ pip -V
pip 9.0.3 from /home/ ... /python2.7/site-packages (python 2.7)
Now you can proceed to install PracMLN and its requirements. Hope this helps!
Hello,
Thanks for your reply. Following your suggestions I uninstalled the pip version 10 and installed the one you mentioned. Then I installed PracMLN, everything went good during the installation but when I ran the command C:\Python27\mlnlearn I received the following message:
C:\Python27>mlnlearn
Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\mlnlearn.exe__main.py", line 5, in
I am new in Python, and MLN so please accept my apologies for asking a kind of a silly nontechnical question.
Syed
Hi Syed,
There are no silly questions.
Looks like your setup was successful. If I understand correctly, your issue is the same as #13. This is a Windows-specific error, and unfortunately I am not aware of any solution yet. It looks like dnutils is actually not cross-platform, and doesn't work on Windows. However, I am unsure if this is really the case, since I can't find it being reported elsewhere on the internet.
Unfortunately I don't use Windows myself, and can thus offer very little by way of advice, but there must be some possible workaround that you could discover.
I'm getting a similar attribute error when I try to import pracmln in a Jupyter notebook on a MacBook Pro.
AttributeError Traceback (most recent call last)
Hi Thomas I moved to Ubunto because I remained unable to solve it on Windows. Its pretty much straightforward to installation Ubunto alongside a Windows platform.
Best of luck, Syed
On Wed, Feb 6, 2019, 5:51 PM Thomas L. Packer <notifications@github.com wrote:
I'm getting a similar attribute error when I try to import pracmln in a Jupyter notebook.
AttributeError Traceback (most recent call last) in ----> 1 import pracmln
~/anaconda3/envs/mln/lib/python3.6/site-packages/pracmln/init.py in 20 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---> 22 from .mln.base import MLN 23 from .mln.database import Database 24 from .mln.constants import *
~/anaconda3/envs/mln/lib/python3.6/site-packages/pracmln/mln/init.py in 25 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 ---> 27 from .base import MLN 28 from .base import HARD 29 from .base import Predicate
~/anaconda3/envs/mln/lib/python3.6/site-packages/pracmln/mln/base.py in 25 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 import pyparsing ---> 27 from dnutils import logs, ifnone, out 28 29 from ..logic import FirstOrderLogic, FuzzyLogic
~/anaconda3/envs/mln/lib/python3.6/site-packages/dnutils/init.py in 5 from .debug import out, stop, trace, stoptrace 6 from .tools import ifnone, ifnot, allnone, allnot, edict, idxif, first, last, LinearScale ----> 7 from .signals import add_handler, rm_handler, enable_ctrlc 8 from .threads import Lock, RLock, Condition, Event, Semaphore, BoundedSemaphore, Barrier, Relay, Thread, 9 SuspendableThread, sleep, waitabout, Timer
~/anaconda3/envs/mln/lib/python3.6/site-packages/dnutils/signals.py in 14 SIGBUS = signal.SIGBUS 15 SIGCHLD = signal.SIGCHLD ---> 16 SIGCLD = signal.SIGCLD 17 SIGCONT = signal.SIGCONT 18 SIGFPE = signal_.SIGFPE
AttributeError: module 'signal' has no attribute 'SIGCLD'
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danielnyga/pracmln/issues/18#issuecomment-461192257, or mute the thread https://github.com/notifications/unsubscribe-auth/AmDlo1y-cSD10wmgw8oP_Z1AbLXAPcYPks5vK0dOgaJpZM4Utd7I .
I'm on a Mac. I cannot seem to get it to work.
I see that ProbCog has examples for running inference from Python. I can run ProbCog okay for the most part on my Mac.
What is the relationship between PracMLN and ProbCog? Does PracMLN simply provide a python package wrapper for ProbCog? Is ProbCog being maintained actively?
Also on a Macbook, can not get it to work
` 1 # -- coding: utf-8 -- 2 # 3 # Markov Logic Networks (...) 24 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---> 27 from .base import MLN 28 from .base import HARD ... ---> 25 SIGCLD = signal.SIGCLD 26 SIGCONT = signal.SIGCONT 27 SIGFPE = signal_.SIGFPE
AttributeError: module 'signal' has no attribute 'SIGCLD'`
Hi, I have python27 installed on Windows 10, the packages: networkx, scipy, numpy and all that are required are installed already. Trying the following command, after downloading pracmln in a folder, say C:\pracmln:
C:\pracmln>python setup.py install Traceback (most recent call last): File "setup.py", line 7, in
pip.main(['install', 'appdirs'])
AttributeError: 'module' object has no attribute 'main'
Then I used pip:
C:\pracmln>pip install pracmln Collecting pracmln Using cached https://files.pythonhosted.org/packages/79/c8/757ecbf41fd85a942c9c1fe3d6087b845969a70ef95f23cca1bb746e861c/pracmln-1.2.3.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in
File "c:\users!snd804\appdata\local\temp\pip-install-_ftvu1\pracmln\setup.py", line 7, in
pip.main(['install', 'appdirs'])
AttributeError: 'module' object has no attribute 'main'
Command "python setup.py egg_info" failed with error code 1 in c:\users!snd804\appdata\local\temp\pip-install-_ftvu1\pracmln\
What am I missing? Can you guide?
Thanks
Syed