pypa / pipx

Install and Run Python Applications in Isolated Environments
https://pipx.pypa.io
MIT License
10.64k stars 418 forks source link

Package not Recognized as a Python Package After pipx Installation #1533

Closed Worfran closed 2 months ago

Worfran commented 2 months ago

I followed the installation process in the quick installation guide, but OpenMC is not recognized as a Python package.

I used pipx to install the package and have already run pipx ensurepath, but my Python scripts do not recognize OpenMC.

I am new to this type of coding and to using Linux. I would greatly appreciate any help.

When I try to install it again, I get the following message:

'openmc' already seems to be installed. Not modifying existing installation in '/home/.../.local/share/pipx/venvs/openmc'. 

And when I use ensurepath, I get:

/home/.../.local/bin is already in PATH.
⚠️  All pipx binary directories have been added to PATH. If you are sure you want to proceed, try again with the '--force' flag.
yolabingo commented 2 months ago

pipx is not the right tool for this job, pipx is for installing cli tools written in Python

Based on the openmc docs you link you shared, the docker method looks simplest https://docs.openmc.org/en/latest/quickinstall.html#installing-on-linux-mac-windows-with-docker

Worfran commented 2 months ago

Hi, thank you for your help. Here’s what I did:

  1. Created a Python environment """ $ python -m venv """

  2. Added an alias in my console: """ alias ="source /bin/acticate" """
  3. Installed OpenMC using pip as in the quick installation guide inside the python enviroment.