Can't find model 'en' in Rasa using Python - python

I'm new to Rasa NLU and I'm trying to train my bot by typing python nlu_model.py on the cmd.
However, it gives this error: OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a data directory.
I researched on other forums and sites how to solve this error and they recommended python -m spacy download en. It works, however...
However, I still get the error from above when I try to type python nlu_model.py in the cmd. What could be the problem in this? Thanks in advance.
P.S. I am new to Rasa and I am just following this video tutorial in Youtube: https://www.youtube.com/watch?v=xu6D_vLP5vY&t=201s

The line "you dont have sufficient privilege to perform this operation" suggests that you are lacking permission.
So could you please either run python -m spacy download en in a virtualenv or you run your terminal as Administrator. Both approaches are also described here: https://spacy.io/usage/#symlink-privilege

A working, but dirty way of solving it would be to just copy/paste the en_core_web_sm folder from the first to the second directory and renaming it as en.
It's not future-proof because you'd need to re-do it every time you update Spacy...
Using conda environments didn't work for some reasons on my limited access company laptop.

Related

Installing TensorFlow Profiler for Dummies

I am trying to follow this guide to install the TensorFlow Profiler to better understand why my recently installed Keras does run on the GPU, but hardly uses any ressources (and is really slow). However, I am unable to come to any results, since the guide does not provide me with sufficient information, since I am not a programmer by trade and obiously lack necessary knowledge.
What have I tried so far?
I use Anaconda and have a running version of python 3.7 installed. I also installed tensorflow and the necessary drivers and such so that tensorflow is able to access my GPUs. Following the linked guide, I downloaded the "install_and_run.py" and tried executing it using the conda prompt. I get asked to specify --envdir and --logdir. Where do I point these? Is the environment directory just the directory to my current conda environment? Since I tried pointing both envdir and logdir into that direction and ended up with the error that the command
True" is unknown and "True' returned non-zero exit status 1.
I could not come up with any solution for this. It should probably be mentioned that I have very little experience in using the conda prompt to run .py-files and usually only use it to install packages.
I am also unsure what is meant by the subsequent steps that talk about the CUPTI path. The given path is no complete path as far as i know. Where am I supposed to look for it? Or am I meant to exectute some of this
/sbin/ldconfig -N -v $(sed 's/:/ /g' <<< $LD_LIBRARY_PATH) | \
grep libcupti
as a command? I have tried running /sbin/ldconfig -N -v $ but my system could not find the path (potentially because I started looking from the wrong directory?).
Any help is much appreciated. Sorry for the potentially confusing post from a confused person.
Thank you!
Tensorflow profiler is no longer bundled with Tensorboard. There is a tutorial on how to install and run it, when fitting Keras model.
The summary is:
Inside your env run pip install tensorboard_plugin_profile
Declare a tensorboard callback as you normally would
tboard_callback = tf.keras.callbacks.TensorBoard(log_dir = logs,
histogram_freq = 1,
profile_batch = '500,520')
Fit your model (with declared tensorboard callback)
On a separe terminal (with your env activated) run tensorboard --logdir=path/to/logs
The Profiler tab shown in the tutorial may not be visisble, but there should be a profile option available in the drop down menu on the top right corner.

How do I fix this python converting file into an app - still have not found a solution

This question is not a duplicate of this question, because I am trying to create an app.
I am currently following this tutorial, but when I try to run my app,
my command prompt prints out this error:
Why does this error happen and how can I solve it? I read through all the answers to the linked question, but none of them are pertinent to my problem.
Please anyone help me, I still haven't found a working solution; I am getting desperate!!!
Edit: I can't just install and uninstall pynput? Idk why it doesn't work because shouldn't pynput come with idle?
Version: 3.74 python idle, most updated version of pyinstaller
The following might help you if you haven't tried them already:
Update pip from the command line
Unistall pyinstaller
Re-install pyinstaller and try it again
If the above does not work, try running the following command in the command line. Make sure there are some print statements in your code to see if it works.
python monitoring_culmination_product.py
If you got a message saying "python is not recognised as an internal or external command" then python might have not been added as an environment path.Try this to fix the issue.
You could always re-install python if things get difficult.(make sure you install the appropriate version 32-64bit)
If the command though executed without a problem. Try to use pyinstaller on another file to see if the problem has to make sure the problem has to do with pyinstaller.
From a personal experience, pyinstaller can be unreliable at times so I put the following line in my projects just to make sure. It might help you too.
import pkg_resources.py2_warn
Disclaimer: Although it is not specified I assume that you are using Windows
You could try to use conda create to get an environment containing all the need dependencies (numpy, etc) and then use pyinstaller as explained in this discussion.
Please fall back to 1.6.8 version of pynput. pip install pynput==1.6.8
Ref : https://stackoverflow.com/a/63721929/14759065

How to install and use PyXB? 'pxbgen' is not recognized

I'm trying make sense of XML messages in Python with the use of PyXB.
However, when I install PyXB, I'm getting an error when trying to use the pyxbgen command: "'pxbgen' is not recognized as an internal or external command, operable program or batch file."
I'm using Anaconda to manage packages and I'm running Windows 10.
For context, I've been trying to follow this GitHub readme, but I'm stuck on generating classes:
https://github.com/openraildata/stomp-client-python
I've tried installing from pip as well as through conda-forge but the result is the same (and I also can't locate the pyxbgen file). I've also tried using setup.py manually, after which I found the pyxbgen file but still cannot use it.
I have seen the issue appearing on the internet but no real solution. Any advice on how to solve/diagnose the issue?
First, you need pyxbgen, not pxbgen. If it's not found ask pip where it's installed:
pip show --files pyxb
Second, a year ago the author announced End-of-Life. You can try a little bit updated fork:
pip install git+https://github.com/jonfoster/pyxb.git#egg=pyxb
Once I sent a few fixes and they were accepted.
You may also try to look at generateDS. It's still being actively developed.
PS. I've tried both products but my XML Schema is so big and complex both failed to handle it. Do not be disappointed and not expect too much from them.

PluginMissingError due to vertical_demo in OpenEdx

I want to install xblock sdk and followed this tutorial
Xblock installation
But, now I am facing PluginMissingError due to vertical_demo. Any pointers appreciated.
Exploring the cause of this problem, I have came to discussion and found the solution on Google groups that solves my problem. Here is the link:
xblock pluginmissingerror
It says that you need to run make install command in xblock-sdk directory.

Unable to download praw using pip

I'm currently working my way through this guide which details how to make a reddit bot. followed the first step and ran my code in Python IDLE but had an issue because I didn't have PRAW downloaded.
My question is how exactly do I download PRAW? I looked around and tried downloading it through a few methods but none of them seemed to work for me. Currently working my way through this method but I keep getting an error:
Fatal error in launcher. Unable to create process using...
Try the following
Download the zip from https://pypi.python.org/pypi/praw#downloads
Unzip.
python setup.py install

Categories