Closed bsailer2510 closed 6 months ago
I don't have a Windows at hand, but just for debugging purposes, could you try the following? (I would like to check whether you have an error)
from pyModeS import c_common
If this fails, please try to reinstall that way:
pip uninstall pymodes
pip install -U pymodes --no-binary pymodes
Then try again the import. If this works (only), please tell me the result of the following command:
from pathlib import Path
import pyModes
list(Path(pyModeS.__path__[0]).glob("**/flarm/decode*"))
I don't have a Windows at hand, but just for debugging purposes, could you try the following? (I would like to check whether you have an error)
from pyModeS import c_common
Output:
>>> from pyModeS import c_common Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'c_common' from 'pyModeS' (C:\Users\bernh\anaconda3\Lib\site-packages\pyModeS\__init__.py)
After deinstallation and with
pip install -U pymodes --no-binary pymodes
it runs into
`(base) PS C:\Users\bernh> pip install -U pymodes --no-binary pymodes Collecting pymodes Using cached pymodes-2.16.tar.gz (63 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: numpy<2.0,>=1.24 in c:\users\bernh\anaconda3\lib\site-packages (from pymodes) (1.24.3) Requirement already satisfied: pyzmq<25.0,>=24.0 in c:\users\bernh\anaconda3\lib\site-packages (from pymodes) (24.0.1) Building wheels for collected packages: pymodes Building wheel for pymodes (pyproject.toml) ... error error: subprocess-exited-with-error
× Building wheel for pymodes (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
C:\Users\bernh\AppData\Local\Temp\pip-install-3wffpngh\pymodes_e1ada962e3ac412ea614ece9dbf63481\build.py:4: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.command import build_ext
Compiling pyModeS/c_common.pyx because it changed.
Compiling pyModeS/decoder/flarm/decode.pyx because it changed.
[1/2] Cythonizing pyModeS/c_common.pyx
[2/2] Cythonizing pyModeS/decoder/flarm/decode.pyx
Traceback (most recent call last):
File "C:\Users\bernh\AppData\Local\Temp\pip-install-3wffpngh\pymodes_e1ada962e3ac412ea614ece9dbf63481\build.py", line 69, in
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pymodes Failed to build pymodes ERROR: Could not build wheels for pymodes, which is required to install pyproject.toml-based projects`
With reference to a specific version the installation works. Pip lists installed version 2.16 now but,....
`>>> import pymodes
Traceback (most recent call last):
File "
from pyModeS import c_common Traceback (most recent call last): File "
", line 1, in ImportError: cannot import name 'c_common' from 'pyModeS' (C:\Users\bernh\anaconda3\Lib\site-packages\pyModeS__init__.py) `
A reboot didn't help. Tried it in Jupyter, Command prompt and Anachonda environment. Output is everywhere the same.
There' also an issue with the installation in Colab:
https://colab.research.google.com/drive/1E7rFCFMPLKDF_PU91DQXcCdSk0XPcVqI?usp=sharing
Please try pyModeS v2.17 (couldn't try myself, crossing fingers...)
With the import of the package i run into a Module error.
OS: WIN11 Python: 3.11.4 pyModeS versions tested (same issue in all versions): 2.14, 2.15, 2.16 Packages installed via pip and requirements of
`--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) Cell In[6], line 1 ----> 1 from traffic.data import opensky 3 flight = opensky.history( 4 "2023-02-05 15:45", 5 stop="2023-02-05 16:45") 7 flight
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\traffic\data__init.py:242, in getattr__(name) 240 if name == "opensky": 241 from . import session --> 242 from .adsb.opensky import OpenSky 244 # give priority to the OPENSKY_CACHE environment variable 245 opensky_cache = os.environ.get("OPENSKY_CACHE", None)
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\traffic\data\adsb\opensky.py:29 27 from ...core.time import round_time, timelike, to_datetime 28 from ..basic.airports import Airport ---> 29 from .opensky_impala import Impala 31 if TYPE_CHECKING: 32 from cartopy.mpl.geoaxes import GeoAxesSubplot
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\traffic\data\adsb\opensky_impala.py:27 25 from ...core.time import round_time, split_times, timelike, to_datetime 26 from ...core.types import ProgressbarType ---> 27 from .flarm_data import FlarmData 28 from .raw_data import RawData 30 _log = logging.getLogger(name)
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\traffic\data\adsb\flarm_data.py:3 1 from typing import Iterable, Optional, Type, TypeVar ----> 3 from pyModeS.decoder.flarm import DecodedMessage, flarm 4 from tqdm.rich import tqdm 5 from typing_extensions import Annotated
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyModeS\decoder\flarm__init__.py:3 1 from typing import TypedDict ----> 3 from .decode import flarm as flarm_decode 5 all = ["DecodedMessage", "flarm"] 8 class DecodedMessage(TypedDict):
ModuleNotFoundError: No module named 'pyModeS.decoder.flarm.decode'`