How to Install Claude Desktop with MCP Desktop Commander on Ubuntu/Debian Linux

If you’re a Linux user who wants to run Claude Desktop with powerful Model Context Protocol (MCP) (https://modelcontextprotocol.io/) tools, this guide will walk you through the entire process. We’ll install Claude Desktop and set up the Desktop Commander MCP server, which allows Claude to interact with your desktop environment.

This Linux-beginner-friendly guide is based on my experience installing it this week on Pop!_OS on an Asus Nvidia machine, and was of course created with help from Claude.

If you haven’t seen it in action, DesktopCommander MCP is a thing of beauty:

⚠️ Important Warnings and Prerequisites

Before you begin:

  • Backup any important data – always a good idea
  • System requirements: Ubuntu 20.04+ or Debian 11+/Debian-based distro (I’m running on Pop!_OS 22.04 LTS with Nvidia); Anthropic doesn’t publish RAM, disk space, or CPU requirements, but third-party online posts recommend 8GB ~ 32GB RAM
  • Terminal comfort: This guide involves using the terminal (https://ubuntu.com/tutorials/command-line-for-beginners), but all commands are provided step-by-step

What You’ll Install

  • Claude Desktop: The desktop application for Claude AI
  • Node.js via NVM: JavaScript runtime needed for MCP servers
  • Desktop Commander MCP: Allows Claude to interact with your desktop (take screenshots, run commands, etc.)

Step 1: Update Your System

First, let’s make sure your system packages are up to date.

  1. Open your terminal (https://help.ubuntu.com/community/UsingTheTerminal) by pressing Ctrl+Alt+T

  2. Update your package lists and upgrade existing packages:

sudo apt update && sudo apt upgrade -y

What this does: sudo (https://www.sudo.ws/about/) gives you administrator privileges, apt (https://ubuntu.com/server/docs/package-management) is Ubuntu/Debian’s package manager, and this ensures your system has the latest security updates.


Step 2: Install Essential Dependencies

Install tools we’ll need for the installation process:

sudo apt install -y curl wget gnupg2 software-properties-common

What these tools do:

  • curl (https://curl.se/): Downloads files from the internet
  • wget (https://www.gnu.org/software/wget/): Alternative download tool
  • gnupg2 (https://gnupg.org/): Handles cryptographic signatures for security
  • software-properties-common: Manages software repositories

Step 3: Install Node.js Using NVM

We need Node.js (https://nodejs.org/) to run MCP servers. We’ll use NVM (Node Version Manager) (https://github.com/nvm-sh/nvm) which makes managing Node.js versions easier.

  1. Download and install NVM if you don’t already have it installed:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
  1. Restart your terminal or reload your shell configuration:
source ~/.bashrc
  1. Verify NVM was installed:
nvm --version
  1. Install the latest LTS (https://nodejs.org/en/about/previous-releases) version of Node.js:
nvm install --lts
nvm use --lts
  1. Verify Node.js and npm (https://www.npmjs.com/) are working:
node --version
npm --version

You should see version numbers after both commands.


Step 4: Download and Install Claude Desktop

Note: We’re using a community-maintained package since Anthropic (https://docs.anthropic.com/en/docs/claude-code/getting-started) doesn’t officially support Linux yet.

  1. Visit the Claude Desktop for Debian GitHub repository (https://github.com/aaddrick/claude-desktop-debian) in your web browser. (Unfortunately this package is deprecated, BUT there are a couple of active forks, so if you’re reading this in later months and the package is broken, check the active forks.)

  2. Go to the “Releases” section and download the latest .deb file (https://en.wikipedia.org/wiki/Deb_(file_format))

  3. Navigate to your Downloads folder in the terminal:

cd ~/Downloads
  1. Install the downloaded package (replace filename.deb with the actual filename):
sudo dpkg -i claude-desktop_*.deb
  1. If you encounter dependency issues, fix them with:
sudo apt install -f

What this does: dpkg (https://wiki.debian.org/dpkg) is the low-level package installer for Debian/Ubuntu systems. The -f flag fixes broken dependencies.


Step 5: Create Claude Desktop Configuration Directory

Claude Desktop needs a configuration file to know about MCP servers.

  1. Create the configuration directory:
mkdir -p ~/.config/Claude

What this does: mkdir -p (https://www.gnu.org/software/coreutils/manual/html_node/mkdir-invocation.html) creates directories and any necessary parent directories. The ~ symbol represents your home directory (https://tldp.org/LDP/abs/html/special-chars.html).


Step 6: Test Desktop Commander MCP Server

Before configuring Claude Desktop, let’s make sure the Desktop Commander MCP server works.

  1. Test the MCP server directly:
npx @wonderwhy-er/desktop-commander@latest

You should see output like:

Loading schemas.ts
Loading server.ts
Setting up request handlers...
[desktop-commander] Initialized FilteredStdioServerTransport
  1. Press Ctrl+C to stop the test server.

What this does: npx (https://docs.npmjs.com/cli/v7/commands/npx) runs Node.js packages without permanently installing them. This tests that the MCP server can start properly.


Step 7: Configure Claude Desktop for MCP

Now we’ll create the configuration file that tells Claude Desktop about our MCP server.

  1. Create the configuration file:
nano ~/.config/Claude/claude_desktop_config.json

What this does: opens nano (https://www.nano-editor.org/) a text editor for the terminal.

  1. Copy and paste this configuration into the file:
{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": [
        "@wonderwhy-er/desktop-commander@latest"
      ]
    }
  }
}
  1. Save and exit nano:
    • Press Ctrl+X
    • Press Y to confirm saving
    • Press Enter to confirm the filename

Step 8: Launch Claude Desktop

  1. Start Claude Desktop from the graphical applications menu, or run from terminal:
claude-desktop
  1. Sign in with your Anthropic account when prompted

  2. Look for MCP indicators in the interface – you should see evidence that the Desktop Commander server is connected


Step 9: Test Your MCP Setup

  1. In Claude Desktop, try asking Claude to take a screenshot:

    “Can you take a screenshot of my current desktop?”

  2. Or ask Claude to check system information:

    “What’s my current working directory and what files are in my home folder?”

If Claude can respond to these requests with actual information about your system, congratulations! Your MCP setup is working.


Troubleshooting Common Issues

Issue: “Cannot find module” errors

Solution: This usually means there’s a problem with literal command substitution in your config file:

  1. Check your config file for any "$(which npx)" strings:
cat ~/.config/Claude/claude_desktop_config.json
  1. If you see "$(which npx)" anywhere, replace it with just "npx" – the simple form works when Node.js is properly installed via NVM

Issue: Claude Desktop won’t start

Solution: Check if all dependencies are installed:

sudo apt install -f
sudo apt update

Issue: MCP server not connecting

Solution: First, verify that Desktop Commander itself is working:

  1. Test the MCP server directly to confirm it’s functioning:
npx @wonderwhy-er/desktop-commander@latest

You should see output like:

Loading schemas.ts
Loading server.ts
Setting up request handlers...
[desktop-commander] Initialized FilteredStdioServerTransport
Loading configuration...
Configuration loaded successfully
Connecting server...
Server connected successfully
  1. If that works (press Ctrl+C to stop it), then the issue is with Claude Desktop’s configuration, not the MCP server itself

  2. Check Claude Desktop logs for connection errors – these are usually in the application’s output when started from terminal


Security Considerations

Important: The Desktop Commander MCP gives Claude significant access to your system, including:

  • Taking screenshots
  • Running terminal commands
  • Accessing files

Best practices:

  • Only use this setup on personal machines, not shared computers
  • Review what you’re asking Claude to do before confirming actions
  • Consider creating a separate user account for testing MCP functionality
  • Keep your system updated with security patches

Keeping Everything Updated

Update Node.js

nvm install --lts
nvm use --lts

Update MCP packages

The @latest tag in our configuration automatically uses the newest version, but you can manually update:

npm update -g @wonderwhy-er/desktop-commander

Update Claude Desktop

Check the project forks on GitHub periodically for new .deb package releases and install them using the same dpkg process.


Uninstalling (If Needed)

Remove Claude Desktop

sudo apt remove claude-desktop

Remove Node.js and NVM

nvm uninstall node
rm -rf ~/.nvm

Remove the NVM lines from your ~/.bashrc file using a text editor.

Remove configuration files

rm -rf ~/.config/Claude

Next Steps

Now that you have Claude Desktop with MCP working, you can:

  1. Explore other MCP servers: Check the MCP ecosystem (https://github.com/modelcontextprotocol) for additional tools
  2. Customize your setup: Add more MCP servers to your configuration
  3. Learn more about MCP: Read the official MCP documentation (https://modelcontextprotocol.io/docs)

Remember to always be cautious when giving AI systems access to your computer, and enjoy exploring the powerful combination of Claude AI with your Linux desktop.


Credits and Resources

  • Claude Desktop for Debian: Community package by aaddrick, deprecated recently but forked (https://github.com/aaddrick/claude-desktop-debian)
  • Desktop Commander MCP: Created by @wonderwhy-er (https://github.com/wonderwhy-er/desktop-commander) – Thanks, Dmitry, for your help on Discord confirming that it was indeed the config file
  • Model Context Protocol: Developed by Anthropic (https://modelcontextprotocol.io/)

This guide was created based on real troubleshooting experience and community feedback. If you encounter issues, check the GitHub repositories for these projects or ask for help in Discord/Linux communities.

Repetitive emails? Have your AI craft replies

Do you have one or more types of emails that you need to reply to, but that you are sick and tired of handling? “If I have to answer the same question ONE more time I’ll snap” -type of emails?

Now let’s say you are not the administrator of your corporate or business email account for whatever reason. You want to implement some automations, and you have a vague idea that this should be something an AI can handle, but you’ve no access to the admin control panel needed to connect thing up.

There is a hack for that! This should absolutely NOT be used for sensitive communication, as you would basically be doing an end-run around any security controls your administrator has put into place.

But for nuisance emails an other non-sensitive emails, you can set up a Gmail account and an automatic script which can call an AI to generate replies to these emails, and then send the text back to you.

Details published here: https://claude.ai/public/artifacts/5c2560bd-b18b-43fb-b16e-3f1288dd1a36

Contact me to get this up and running, and get rid of those annoying email tasks!

AI is Your 24-hr Virtual Assistant

Coming back from a conference or event with dozens of business cards? (Or worse – handwritten sticky notes)

Networking board at the 2025 NYC Small Business Expo

Ain’t nobody got time to sit down and type up all these cards and notes manually one by one.
Back in the day, you used to need a card reader machine, or more recently, a card scanning mobile app.

However now you just get your AI assistant to do things for you — simply upload the photos into the AI chat and request not only an OCR scan but specify the output as well:

Asking Claude what it can see can sometimes save time prompting

The trick is to take as clear a photo as possible so as to be able to extract the most accurate information.

You can even ask Claude (or your LLM of choice) to generate contact files / Vcards which can be easily imported into your email contacts.

Subscribe for more time-saving AI use-cases for your business! And don’t forget to book your session.

Launching AI training for Women in Business

Rolling out to Queens businesses now, with the broader New York area access coming soon

The best time to get started with AI was perhaps a few years ago.

The second-best time is now!

That’s what I’m sharing with female founders, women in business, and women-owned businesses in Queens, NY. The takeaway is — if you haven’t used AI tools to save you at least 2-10 hours of work per week yet, now’s your time!

I’ve been teaching a variety of topics for the past 14 years, so empathy, virtual tools, and teaching with metaphors, visual aids, and patience is my jam. I’m so happy to bring you into the world of AI tools and delegate those painful tasks you dread each week to your new AI assistant.

Is it invoicing? Marketing? Customer follow-up? Or just writing plans and proposals or reviewing lengthy contracts?

AI can help you save time and money. Book your consultation with me now to learn more (psst… it’s free).

Installing Linux on Asus ROG Strix, part 2

Well, I got the main partition resized thanks to this blog post. It was turning off things like hibernation and system restore. Then I shrank the Windows partition down to about 98 GB. Take that, Windows!

Still can’t get rid of the obnoxious logo

After a reboot, it was pretty smooth sailing. After installing the proprietary NVIDIA drivers and restarting with a special pin entered from the boot partition, I restarted again. However, I got the error “Nvidia kernel module missing, falling back to nouveau” no matter what I tried.

So I started thinking I would need to install Arch Linux, as it seems to support NVIDIA drivers well. But another contender emerged: Pop!_OS. Yes, of system76 fame. I had heard of it many times but never tried it.

I made another live USB stick and split the Fedora partition in half, installing Pop!_OS (Secure Boot needs to be shut off otherwise the live USB likely won’t start).

Lo and behold, it worked out of the box. The keyboard backlighting can be controlled with the function keys just fine, although I haven’t tried changing the colors yet. Pop!_OS even wakes from suspend after lid close, something that I’ve seen fail many times on other OSes.

So Pop!_OS, you have a new fan.

Installing Linux on Asus ROG Strix G16

How to lose your hair quickly

A trip to Microcenter is a candy store-like experience with good customer service and great selection. I bought a brand-new Asus ROG Strix, despite the exquisitely obnoxious branding and lighting, for my next Linux box.

I was told that for warranty purposes, should anything occur and I need to bring the machine in for service, I’d have to re-install Windows first. So while making the backup restore media and setting up (a local account) I decided perhaps it’s best to dual boot.

The Interwebs told me to go with Fedora, and who am I to argue. So I made a boot thumb drive and took it for a spin. I used to use Balena Etcher but this time I went with Fedora’s Media Writer tool which worked well (but for Windows 10 users, autoplay might need to be switched off before writing the drive). I was impressed that there was even some limited lighting control out of the box.

But the ASUS problems started coming fast and furious. Top priority had been to flash the BIOS in order to remove the hideous “Republic of Gamers” boot loading logo, but alas, the tool for that was not available for my specific motherboard. Oh well; I shall have to just avert my eyes during the boot sequence for now.

Next up, I couldn’t access the main partition from inside the Fedora live preview; in disk management there was a little padlock icon and the word “Bitlocker.”

What in tarnation. Pretty sure I toggled that off during Windows setup, so I was a tad confused. Booting back into Windows settings, there was a button which said, “Turn on Bitlocker”. Now I was even more confused, because it sure seemed to be on already.

Apparently Bitlocker encryption is default on Windows 11. Under Windows “Privacy & security”, there is a toggle to turn off Device Encryption. Once I shut that off, it said “decrypting” for a few minutes, and then I was able to go back into Fedora live OS and access the drive.

Another hurdle: Fedora tells me “Not enough free space on selected disks.” Microsoft hogs 5 partitions full of goodness-knows what. So I toddle off into Windows Disk Management to resize the main partition. Guess what — due to unmovable files, the partition could only be shrunk to about 800GB (leaving only about 200 for Fedora).

It’s bedtime, so tomorrow I will delete some expendable-looking things, run Disk Cleanup, and defragment to see if that will help. But I’m starting to think it’s not worth all this hassle to dual boot.

To be continued…

Mozilla’s NSS package on Windows 10 (when Chocolatey fails you)

I recently needed certificate handling for some CraftCMS development. Using Chocolatey, I tried installing mkcert and nss (Network Security Services) but got the following error:

nss not installed. The package was not found with the source(s) listed.
Source(s): 'https://chocolatey.org/api/v2/'

(Yes, I have still not fully switched back to 🐧Linux yet! Getting there, but I am still using Teams breakout rooms — not available on Linux — and Outlook for my teaching gig, until that ends in a few months.)

So you want to support Firefox, even though Firefox doesn’t support you, o Windows developer?

Yes, let’s be the ‘bigger man’! LOL

Heavily adapted version of Johann ‘Myrkraverk’ Oskarsson’s handy blog post follows, with just a bit of updating for 2024.

It’s gonna require a LOT of steps, including installing Visual Studio Installer and Python, in case you don’t already have it installed — you’ll need Python to install a package called gyp-next :

python3 -m pip install gyp-next

Next you’ll need to download the NSS package manually from Mozilla:

I also used 7-zip in the terminal to extract the package (you’ll need to extract the .gz file, then extract the resulting .tar ball once more). Your filename will be different depending on the newer version you may download:

7z x nss-3.101.1-with-nspr-4.35.tar.gz
...
7z x nss-3.101.1-with-nspr-4.35.tar

Now you can go into the Visual Studio Installer graphical application. Click the Launch button:

This will launch a new type of terminal inside that app, like this:

Now you can cd into

cd C:\mozilla-build\msys2

Then enter the command:

msys2_shell

ANOTHER shell will pop open (keep the old window open) — enter your SSH password (nothing will appear at the prompt as usual) then hit Enter. It should say, “Identity added” to your local hosts.

Almost there. Now return to the terminal window which was launched by Visual Studio Installer (the one we kept open). CD into the extracted directory for NSS ( cd nss\nss-3.101.1 or whatever folder you created for it). Make sure you further cd into ‘nss’.


Lastly, run

build.sh

Now if you back out one level, you will see you have a new folder called ‘dist’. I don’t think you actually need this folder when just developing frontend applications, but let’s see! UPDATE: no, I have not needed it and it’s been 2 months. 😉

Trying out Ignite with a new Android project

Because I have some free time this evening (wow!) I thought I’d burrito-ify myself in front of the computer and finally make a photo viewer Android app for myself.

Let me back up a bit — since LG stopped making phones, I was forced to get a Motorola phone recently. It’s nice and all, but it doesn’t come with a photo viewer. Which means one must use all the Google apps (file viewer, Photos app, etc) to access one’s files.

This is no bueno.

So naturally I have simply not been opening my files on my phone. Unless someone has sent it to me via SMS or Discord or what have you, where I can view a preview. Or, if I upload it to my Proton storage, I’ll see a preview. (Even VLC Media Player seems to have failed me here — it doesn’t open 95% of the video files I task it with opening, for some reason.)

I got started with a video appropriately titled, “Getting Started With Ignite,” by Jamon Holmgren of Infinite Red. (https://www.youtube.com/watch?v=KOSvDlFyg20)

Install Yarn first if you want to follow this video smoothly (it can be installed via npm).

Deciding to upgrade to Node 20.8 to keep pace with the video, I downloaded the msi file from the official Node site, and double-clicked it — I didn’t have any reason not to install it globally on this machine. The usual “Get apps from Store / Install anyway” Microsoft warning appeared, but it had scroll bars; weird.
Windows-install-warning2-Capture
I clicked “Install anyway” several times — nothing happened. Did a dreaded restart. Same thing. So I had to run it from inside PowerShell:

msiexec /i “node-v20.8.0-x64.msi”

Quite irritating, but I thought it was just a fluke/bug.
Next was npx ignite-cli@next new PhotoView

… and selected all the desired settings. I chose all the defaults. I enjoyed the lovely ‘splash screen’:



When I got to ‘yarn android’, the error, ‘Failed to resolve the Android SDK path’ appeared. I remembered that I’d never installed Android studio on this particular computer. Downloading from the official Android homepage, I again ran into the same Windows bug. This time the exe file would not run in PowerShell. My hubby suggested running the Compatibility troubleshooter, which worked, but it seems that the bug can also be bypassed by turning off that warning in the OS settings under Apps & Features > Choose Where to Get Apps.

However, now I’m getting, “Starting Metro Bundler
CommandError: No Android connected device found, and no emulators could be started automatically.”

Yay, new error message!
But I’m ready for bed now… to be continued.
Ok, just kidding…I surfed around Twitter (Xitter?) for a bit, then got my second wind.

Starting Android Studio, then going into Device Manager and clicking the play button to start the device…

…seems to have worked:

Ignite-boilerplate-emulator

Now to attempt some modifications so I can gradually get a photo viewer… to be continued…

Downshift: Transitioning and the Career Twisties

My online presence currently projects as a Web Developer, and my current resume still rings more communications- and marketing-heavy. Really though, I am more of a learner, trying to find learning opportunities which will also pay my bills. But transitioning for the career-changer is not for the faint of heart.

Why did I feel the need to make a change? Upon moving with my husband’s job to Hawaii, I found the Hawaii job market to be very tough. There was nothing approaching my previous salary in New York. And it turns out, getting a good job in Hawaii is very, very much based on having friends in the right places. I made a new friend who gave me local cleaning jobs, and I also did a few temp gigs.

Reasoning that companies in other states would have more openings, I began searching remote job boards. I discovered that the higher-paying remote job listings were for developers, and I found out my dad had also been studying Python and other languages when he passed away, so that sealed my decision to study programming. But I had no idea what to study and actually started out with Python.

After a year of stops and starts (not to mention life drama, as it is wont to do, happening,) I realized I should have been focused on web dev! Yet another 6 months later, I realized that I might have benefited most from the regimentation of a bootcamp. I seriously considered attending a bootcamp out of state, but that would mean leaving home and my husband for months, and I learned that even bootcamp grads have to leave Hawaii to find entry-level work.

Just as the talent saturation of the Bay Area was a big factor in protracting  Patrick Thompson’s (YouTube) job search, the Honolulu area suffers from the opposite: many tourism-related jobs, but not many tech companies featuring entry-level opportunities. Transitioning for the career-changer after a certain age also adds an extra layer of difficulty, since there is competition with shiny new grads for the few positions that are available.

Acceptance and Failing Forward

Still doing the cleaning jobs, and I have a couple of job applications in review. If they get rejected I might wrap up my efforts to enter the web dev employment track. I am proud of all that I’ve learned, but basically I wasted 2 whole years trying to get a remote, entry-level web dev job — something that is still pretty rare! But failure can help you find different approaches and is good for your brain! I am viewing this not as a total fail, but as extremely valuable experience.

For example, I attended meetups and enjoyed working with some great people on a fun internship. Meeting a lot of kind folks in the Twittersphere has also been an unexpected bonus. I learned some essential tools, and learned what I didn’t want to work on!

Also, WordPress freelancing was supposed to be a stop-gap measure until I found a permanent job, but I have learned more about WordPress over the past year than in the previous 5 years as a mere user. I might attempt to go the freelance route. This is something I might not have considered a few years ago.

Lastly, I’ve had a lot of fun — many nights I have had to tear myself away from VS Code and go to bed! I even started a side project which might eventually earn some ad and affiliate revenue. A lot of developers will tell you that they don’t code 24/7, but rather have hobbies such as cooking or sports. So it seems natural that I can have coding as a hobby.

Hindsight Which Might Help Other Career-Changers

In hindsight, transitioning as a career-changer was not even something I could have attempted without the support of my husband. Not knowing what I was getting myself into was probably for the best! If I could go back in time and get a do-over, I would try to secure a remote job with a New York company before leaving New York and relocating to Hawaii. New York has such a diversified economy compared to Hawaii, and there are just way more opportunities available. Also, there seems to be an unfortunate perception of Hawaii residents as beach bums who don’t work, not to mention many mainland companies don’t want to complicate their payroll by hiring out-of-state.

Another thing I could have done differently is studying for the jobs where there is demand, not just studying whatever is interesting. I found Python to be a lot more accessible than JavaScript as a newbie, so that’s what I gravitated towards. Nothing wrong with that, if I had also learned Django. I played with Android Studio (Java) because I wanted to try making a mobile app. I took pre-courses for Lambda School (JS) and AppAcademy (Ruby), instead of just working on my own learning projects. Jumping around so much exploring different technologies, it took me much longer to gain enough skill in one language to pass a coding challenge. There is a confusing amount of stuff out there to learn and without a guide — it is tough to know what to focus on. So I’d say just pick a track/stack and start checking the subjects off one by one.

Which brings me to the final hindsight which I hope someone out there may find useful; having someone to guide you. I really didn’t know exactly what I wanted to do; I just thought I might be good at coding since I like solving problems. Looking at a job board, I had no idea what the difference was between a Web Developer, a Front End Engineer, and a Full-Stack Developer. And I was actually interested primarily in software development and machine learning at first. Having a knowledgeable person to talk to about these tracks might have helped me narrow things down sooner and save a lot of time and energy.

I still have a few job applications out there under consideration, so I will update again later…

Chatbots: Overcoming Errors Using the Rasa NLU Starter Pack in Windows

So I got invited to join a team building a chatbot, exciting! When I am able to say more I’ll definately post. I decided to do a bunch of reading and research in my free time. Ironically it was machine learning which originally attracted me to Python and coding a couple of years ago, and I’d given up on that due to employment options in my area.

I looked into a few options and it seems the best choice for keeping your data to yourself and not using external APIs is an open-source package called Rasa. They have a starter pack you can play with. It comes with a nice video guide, but this is running on Linux. I came across a lot of errors during the install process; hopefully this post will help someone else using Windows.

If you already have Python installed (whether by PyCharm or Anaconda or some other bundle,) open a terminal/command line (cmd.exe) and check to see what version you have by typing:

$ python --version

(Only type everything after the $, at the command prompt.)

You might want to also search for any instance of ‘python.exe’ on your PC.

‘python’ is not recognized as an internal or external command / Can’t find python.exe install folder

When you see “‘python’ is not recognized as an internal or external command” in the terminal, but you know for a fact that you have Python installed (perhaps, um, several different versions in several places,) you might think you are an idiot. But you’re not!

WHY IS THIS THE DEFAULT INSTALL PATH FOR PYTHON ON WINDOWS? WHY APPDATA. WHHYHKLJASLJKHJHKLASDHJKDSAKLadj,sfgjklmbn,dasfkl USE PROGRAM FILES pic.twitter.com/CvtrE2hXBF— CrashBash-Kun (@CrashBash000) July 2, 2017

(frustrated user tweet)

After some web searching, I tried setting the Python path in Advanced System Settings>Environment Variables. But that default install directory was too deep (ideally we want it in a top-level folder,) and it is a hidden system folder to boot, so I was really wondering where it installed to.

The easiest way to fix that is to reinstall Python using the graphical installer. Run the installer as administrator. BE SURE to click the little ‘Add to PATH’ checkbox, or all this will be for naught!! This is a lot quicker than manually adjusting the path in environment variables.
Then choose “Custom install location.” Clicking “Install for all users” should automatically change the install path to the C:Program Files folder.

You may also be able to do this without a full reinstall by selecting Modify/Repair under Control Panel>Programs and Features.

‘$ pip install spacy’ command finishes with murmurhash…MS Visual 14.0 C++ required

Rasa can use spaCy, Tensorflow, or other tool packages to parse text. For some reason, Rasa on Windows requires MS Visual Studio Build Tools. I’m sure there’s a fascinating reason behind this, but for now we just have to accept it. Their user forum and Github page has addressed the issue, and you can download and install the needed bits here. (The link provided in the error message — http://landinghub.visualstudio.com/visual-cpp-build-tools — doesn’t work anymore.)

“access denied” error returned in cmd

Retry the command, but this time run cmd.exe as Administrator (Start menu, type ‘cmd’, right-click the icon and select ‘Run as Administrator.’) I forgot to do this more than a few times.

error: could not find version that satisfies requirement Tensorflow

Turned out I had Python 32-bit installed (issue raised on GitHub here). I uninstalled it via the Programs and Features dialog and installed Python 3.6.8, 64-bit version. I also installed Anaconda because after all the errors, I was getting frustrated with the whole install and just threw the kitchen sink at it. Honestly I’m not quite sure which fixed this error! If I figure it out I will update.

How do you run ‘make’ to train the model?

Unless you install third-party tools, you can’t run the ‘make’ command in the Windows 7 command line. Copy the code from inside the Makefile and paste into the command line:

$ python -m rasa_core.train -d domain.yml -s stories.md -o models/dialogue

ModuleNotFoundError: No module named ‘rasa_core’

I got this after running the rasa_core.train command above. So I ran ‘pip install -U rasa_core’ (again, don’t forget to run as administrator like I did!) This led to the next error:

ERROR: rasa-nlu 0.15.0 has requirement future~=0.17.1, but you’ll have future 0.16.0 which is incompatible.

After a short web search, I just ignored this error because I was getting ready to chuck my laptop out the window. But the code still worked in the end. If you care to share any insights on it, please comment!

ModuleNotFoundError: No module named ‘named win32api’

This appeared after I tried to run the model test with ‘python -m rasa_nlu.server –path ./models’. A web search led me to this solution:

$ python -m pip install pypiwin32

It installed and said ‘successful,’ but the terminal was frozen with no prompt. I started another terminal and re-ran the model test command and…

terminal hangs at “Starting factory <twisted.web.server.Site object”, nothing happens

I thought that nothing happened, but really that was the command to start the server on port 5000. It had been hours since I read through the readme file, and I’d forgotten there was any mention of a server. And I’d seen so many obstacles I didn’t know what success looked like! In the Rasa forums there was a similarly confused poster, and an answer which suggested checking port 5000, but without any mention of HOW to check that port. I went back to the video and found the command:

$ curl XPOST localhost:5000/parse -d '{"query":"Hello", "project": "current"}'

It will need to run in a new terminal window. (When you’re finished you can kill the server in the first terminal window with Ctrl+C.) If you have GitBash installed or if you are using Windows 10 you can run curl. Change “Hello” to “yes”, or “I am Suzy”, and see the different results!