I want to use 'pm4py' but while import:
from pm4py.objects.log.importer.xes import factory as xes_import_factory
I got error:
ModuleNotFoundError: No module named 'pm4py
I use Visual Studio Code on Windows. When I use pip install pm4py from it's terminal(or cmd) I got error like:
Building wheel for cvxopt (setup.py) ... error
ERROR: Command errored out with exit status 1:
But when i use same line pip install pm4py in Anaconda Prompt then it returns that all Requirements are already satisfied (I think I already installed this package). I even found the folder named 'pm4py' in anaconda\lib\site-packages.
pm4py also doesn't appear on the pip list in cmd (and i think it should?).
I've been searching the internet for several hours and can't find a solution. What can I do to use import pm4py?
Solved for jupyter notebook projects: by executing conda install -c conda-forge ciso8601 then pip install pm4py
I encountered the same issue and guess this has been depreciated as development ceased.
Related
(Context: Barely a novice at Terminal, know some SQL, don't know Python)
I'm taking a course on dbt, have my own Snowflake set up, and I'm trying to install dbt-snowflake on Mac. Attempting to run:
pip install dbt-snowflake
This fails, and it returns:
`
Traceback (most recent call last):
File "/Users/xxxx/course/venv/bin/cmake", line 5, in <module>
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
error: command '/Users/xxxx/course/venv/bin/cmake' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
`
I once successfully changed Python version in virtual environment to 3.9 to see whether that was the problem (but I can't replicate how I changed it), that didn't solve the problem, and currently it's back to 3.11.
Have installed multiple versions of snowflake (3.7, 3.9, 3.11). I don't really understand how this works in context of everything.
I have tried deleting and recreating virtual environments (under same name, venv)
uninstalled and reinstalled cmake (pip install --upgrade cmake); this is version 3.25.0
I don't understand how I can have cmake installed and be told there is no module named 'cmake'.
Is there a particular version of Python I should be running, and if so, how do I reliably change that in virtual environments and different directories?
EDIT TO ADDRESS A COMMENT: I installed Python versions via terminal brew install python#3.9
My IDE is Spyder and the distribution I am using is miniconda. I use pip install in the anaconda prompt window (as I usually do).
'pip install xls2xlsx' seems to run fine and install the package.
When I try 'from xls2xlsx import XLS2XLSX' I get the following error:
ModuleNotFoundError: No module named 'currency-symbols'
If I try 'pip install currency-symbols' , I get:
'Requirement already satisfied: currency-symbols in c:\users\user\miniconda3\lib\site-packages (2.0.2) '
I can see both directories in the site-packages directory.
So I had the same or very similar problem, my trace-back said it could not import currency_symbols. I found that the module it was trying to import was the constants from that package. So I went into the py file where xls2xlsx had the issue
"htmlxls2xlsx.py" my traceback said line 40..
currency_symbols_constants =
importlib.import_module('currency-symbols.constants')
I noticed this was part of an 'exception' so I fixed line 37 from import currency_symbols.constants as currency_symbols_constants to import currency_symbols._constants as currency_symbols_constants
Now it imports just fine.
I also had version 2.0.2 of currency-symbols installed, but my working host was using 2.0.1. I discovered that if you install 2.0.1, the issue did not occur.
pip3 install -Iv currency-symbols==2.0.1
Hi Guys, I am trying to install spacy model == 2.3.5 but I am getting this error, please help me!
Try using python 3.6-3.9 instead, where there are binary wheels for pip install to use instead of having to compile from source.
(This is a conflict with python 3.10 and some generated .cpp files in the source package. Python 3.10 wasn't released yet when this version was published.)
I had the similar error while executing pip install -r requirements.txt but for aiohttp module:
socket.c -o build/temp.linux-armv8l-cpython-311/aiohttp/_websocket.o
aiohttp/_websocket.c:198:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~ 1 error generated.
error: command '/data/data/com.termux/files/usr/bin/arm-linux-androideabi-clang'
failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for aiohttp
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install
pyproject.toml-based projects
Just in case I will leave here solution to my error. This error is specific to Python 3.11 version. On Python with 3.10.6 version installation went fine.
To solve it I needed to update requirements.txt.
Not working versions of modules with Python 3.11:
aiohttp==3.8.1
yarl==1.4.2
frozenlist==1.3.0
Working versions:
aiohttp==3.8.2
yarl==1.8.1
frozenlist==1.3.1
Links to the corresponding issues with fixes:
https://github.com/aio-libs/aiohttp/issues/6600
https://github.com/aio-libs/yarl/issues/706
https://github.com/aio-libs/frozenlist/issues/305
Try using:
!pip install spacy==2.3.5
Do not give space between == and 2.3.5
If you give any space between equal sign and version, it may give error.
I have installed python 3.7 and want to do some forecasting using fbprophet (https://facebook.github.io/prophet/docs/installation.html#python)
But I get this error when installing the package using the command (pip install fbprophet)
import pystan
File "e:\repos\usf\venv\lib\site-packages\pystan\__init__.py", line 9, in <module>
from pystan.api import stanc, stan
File "e:\repos\usf\venv\lib\site-packages\pystan\api.py", line 13, in <module>
import pystan._api # stanc wrapper
ImportError: DLL load failed: The specified module could not be found.
I have done some research and got to know that this is possible with conda. But I am looking for a solution without using conda.
Thanks in advance.
It says in the Pystan documentation that configuring a C++ compiler can be challenging on Windows. Following approach worked for me to install Pystan 2.17.1 and FBProphet 0.6:
Install C++ compiler, mingw-w64 (http://mingw-w64.org/doku.php/download) -> I selected this one https://sourceforge.net/projects/mingw-w64/files/
Add C:<MinGW_w64 installation directory>\bin to the PATH environment variable
Create a distutils.cfg file with the following contents in the folder \Lib\distutils in Python install directory (in venv):
[build]
compiler=mingw32
[build_ext]
compiler=mingw32
pip install numpy cython
pip install pystan==2.17.1
Verify the Pystan installation (https://pystan.readthedocs.io/en/latest/windows.html)
pip install fbprophet==0.6
Follow https://github.com/facebook/prophet/issues/1939
I had similar issues even after installing Mingw
conda install libpython m2w64-toolchain -c msys2
Solved all the errors and i am able to install fbprophet finally
Thanks
I had similar issues with my Python3.6 (anaconda)
I reinstalled anaconda for all users (with admin privileges) then
"conda install -c conda-forge pystan"
later i updated all other modules
it works without any error now
I'm trying to build a SAML authentication mechanism in Python using the OneLogin module, but I keep getting this error: ImportError: No module named saml2.auth
I have followed the steps listed here:
https://github.com/onelogin/python3-saml
and installed dependencies as well but i can't install xmlsec library and it says Failed building wheel for xmlsec and failed with error code 1.
(I have done pip install wheel as well)
Any suggestions how to get around this error?
Solved by:
sudo pip install python3-saml
xmlsec (a dependency of python3-saml) had some installation issues on version previous of 1.3.5.
v1.3.5 solved those issues
All i needed was the latest version with everything fixed from here: github.com/mehcode/python-xmlsec/releases/tag/1.3.5