Open dupadhyaya opened 4 years ago
Facing error--------- install.packages("pm4py")
reticulate::use_python(python='C:/ProgramData/Anaconda3/python.exe') reticulate::use_virtualenv("myenv") #ihave this env in anaconda
pm4py::install_pm4py(version = "1.2.7") #Error in py_module_import(module, convert = convert) :
library(pm4py) ;library(bupaR); library(eventdataR) patients_completes <- patients[patients$registration_type == "complete", ] pn <- discovery_inductive(patients_completes)
Can you try to install PM4Py with default and without specifying a Python Path? Also don't use use_virtualenv
when you want to use Conda. You can find more troubleshooting information on how the underlying `reticulate
package finds your Python installation here:
https://rstudio.github.io/reticulate/articles/versions.html
Installing in the default environment, you simply need to use:
pm4py::install_pm4py()
in a fresh R session.
I don't really understand what you did initially as the error message is incomplete or the Github markdown formatting screwed it up. Can you please paste the full error message in a code block?
Hi, I've got some problem installing pm4py. I'm using R version 4.0.5. After running
remotes::install_github("bupaverse/pm4py")pm4py::install_pm4py()
Then I got these error message:
ERROR: Could not find a version that satisfies the requirement ortools==7.4.7247 (from pm4py) (from versions: 7.5.7466, 7.6.7691, 7.7.7810, 7.8.7959, 8.0.8283, 8.1.8487, 8.2.8710, 9.0.9048, 9.1.9490, 9.2.9972)
ERROR: No matching distribution found for ortools==7.4.7247
Could not find `conda` environment, falling back to virtualenv ...
PackagesNotFoundError: The following packages are not available from current channels:
- pm4py==1.2.10
Current channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
Error: one or more Python packages failed to install [error code 1]
Facing the same issue as @woshiseven . Could you please look into it @fmannhardt ?
Looking into the CRAN issue.
On the ortools
issue, it is a bit odd that version 7.4.7247 is not found. It definitely exists:
https://pypi.org/project/ortools/7.4.7247/#files
What kind of environment are you installing this to? Windows, Linux? Do you have an existing Anaconda
or miniconda
environment (when on Windows)?
Hi @fmannhardt, @maskegger,
Do you mean Anaconda environment by the environment having Conda package? I'm using the R environment created by Conda on Mac. But it doesn't have Conda package. It uses Conda package installed in the base python environment. Is it because it doesn't have Conda?
I bypassed the problem by installing pm4py using pip and using reticulate to call pm4py in rstudio. But it's just a bit inconvenient to have to refer to pm4py every time calling an object of it.
The pm4py R package is just using reticulate to access the Python pm4py code. So, if you can access it directly it should also work with the pm4py R package. The whole installation procedure is a bit fragile as it really depends where it finds pmp4y on your system. Maybe try again if the pm4py R package just works now (without installation).
Hi, @fmannhardt . I'm on Manjaro Linux. My first attempt was installing conda using reticulate. Then, I installed miniconda on the system and pointed the conda path, however I face the same issue.
> library(pm4py)
> pm4py::install_pm4py()
Activated conda python: /home/am0/.local/share/r-miniconda/envs/pm4pyr/bin/python
Collecting pm4py==1.2.10
Using cached pm4py-1.2.10-py3-none-any.whl (383 kB)
Collecting intervaltree
Using cached intervaltree-3.1.0.tar.gz (32 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting networkx
Using cached networkx-2.6.3-py3-none-any.whl (1.9 MB)
Collecting pyvis
Using cached pyvis-0.1.9-py3-none-any.whl (23 kB)
Collecting pandas
Using cached pandas-1.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
Collecting pydotplus
Using cached pydotplus-2.0.2.tar.gz (278 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting pulp
Using cached PuLP-2.6.0-py3-none-any.whl (14.2 MB)
Collecting pytz
Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
ERROR: Could not find a version that satisfies the requirement ortools==7.4.7247 (from pm4py) (from versions: 7.5.7466, 7.6.7691, 7.7.7810, 7.8.7959, 8.0.8283, 8.1.8487, 8.2.8710, 9.0.9048, 9.1.9490, 9.2.9972)
ERROR: No matching distribution found for ortools==7.4.7247
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- pm4py==1.2.10
Current channels:
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Error: one or more Python packages failed to install [error code 1]
In addition: Warning message:
In value[[3L]](cond) :
Could not find `conda` environment, falling back to virtualenv ...
@WoshiSeven Interested to know how you bypassed it. I tried using the same method as yours but I get the following error.
discovery_alpha(event_log_entries) -> PN
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named pm4py.algo.discovery.alpha.factory
Presumably, this is due to pm4py python version has to be the same as R version? The python version I installed is 2.2.19.1.
These are steps and error locations install.packages("pm4py") #success pm4py::install_pm4py() #this gave error
1st Error-----------------------------------------
PackagesNotFoundError: The following packages are not available from current channels:
2nd error----------------------------
Error: one or more Python packages failed to install [error code 1].In addition: Warning message: In value[3L] : Could not find
conda
environment, falling back to virtualenv ...I have full anaconda version installed in my system. this images show what installation I have in my windows laptop
---------------------- can you please guide in where I would be going wrong ----