0

Currently moving all of my Pycharm Projects to Linux (Debian-based distro) and had a mod_wsgi dependency in one of my projects. So I get the following error.

RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.

Ok, no problem, so I install apache.

sudo apt install apache2-dev

Testing in the global terminal, apxs appears.

tony@pop-os:~$ apxs Usage: apxs -g [-S =] -n apxs -q [-v] [-S =] [ ...] apxs -c [-S =] [-o ] [-D [=]] [-I ] [-L ] [-l ] [-Wc,] [-Wl,] [-p] ... apxs -i [-S =] [-a] [-A] [-n ] ... apxs -e [-S =] [-a] [-A] [-n ] ...

So I restart the machine, reopen Pycharm, and try installing the requirements again.

pip install -r requirements.txt

Next I proceeed to type 'apxs' in the Pycharm terminal:

(venv) apxs sh: apxs: command not found

Strange, so then I check $PATH in Pycharm:

(venv) echo $PATH /home/tony/PycharmProjects/FirstDjangoProject/venv/bin:/app/bin:/usr/bin

So, /usr/bin is where apxs is installed on the global terminal, but it isn't recognized in pycharm. Strange. I then go take a peek in the /usr/bin dir

(venv) ls /usr/bin/ | grep apxs (venv)

Strange. So certain files that show up in the global terminal (This applies with sudo as well) don't show up in the Pycharm terminal. Anyone know how to work around this?

1 Answer 1

0

Alright, so here's what happened:

I am using Pop!_os and installed the Pycharm Professional flatpak from the Pop!_Shop (Pop!_os' app store). It seems installing it using snap seemed to resolve the issue. Not only that, I had to completely rebuild my venv ask it said something like "Invalid SDK". I also noticed the shell settings, along with the Python version was different (3.7 on the flatpak whereas 3.8 on the snap install).

Lesson learned. Don't always rely on the Pop!_Shop

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .