You are absolutely correct in that I have the 2.0 version of pySmithPlot installed. I downloaded the linked release and I cannot seem to get that running under Python 3.6.5 on Windows. I spun up a new Win 10 VM, installed python-3.6.5-amd64.exe into C:\Python36, ran setup.py on the pySmithPlot release linked above (which worked), downloaded the latest pyLMS7002M-master branch, ran setup.py there (also worked), then attempted to run calculateVNA_900M.py
against the test data from the measurements shown above. I also ran this on my existing PYthon 3.6 installation, and have tried it in a new venv before spinning up the VM all in attempt to start from a “clean” environment. In all cases, I get the following error when attempting to execute “python calculateVNA_900M.py vna_test900-01 plot”:
C:\Download\pyLMS7002M\examples\VNA>python calculateVNA.py vna_test900-01 plot
Traceback (most recent call last):
File "calculateVNA.py", line 25, in <module>
import smithplot
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "C:\Python36\lib\site-packages\pysmithplot-0.1.0-py3.6.egg\smithplot\__init__.py", line 2, in <module>
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 894, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1157, in find_spec
File "<frozen importlib._bootstrap_external>", line 1131, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1112, in _legacy_get_spec
File "<frozen importlib._bootstrap>", line 441, in spec_from_loader
File "<frozen importlib._bootstrap_external>", line 544, in spec_from_file_location
File "C:\Python36\lib\site-packages\pysmithplot-0.1.0-py3.6.egg\smithplot\smithaxes.py", line 1262
def _moebius_xy((x, y)):
^
SyntaxError: invalid syntax
pip list
returns the following:
cycler (0.10.0)
Cython (0.28.1)
kiwisolver (1.0.1)
matplotlib (2.2.2)
numpy (1.14.2)
pip (9.0.3)
pylms7002m (1.2.0)
pyparsing (2.2.0)
pyserial (3.4)
pysmithplot (0.1.0)
python-dateutil (2.7.2)
pytz (2018.4)
pyusb (1.0.2)
setuptools (39.0.1)
six (1.11.0)
I’ll see if the process fares any better under Ubuntu 16.04 LTS.
edit: build results under 16.04 gives the same error for the same line while building the suggested release of pySmithPlot via python3 setup.py install
:
byte-compiling build/bdist.linux-x86_64/egg/smithplot/smithaxes.py to smithaxes.cpython-34.pyc
File "build/bdist.linux-x86_64/egg/smithplot/smithaxes.py", line 1262
def _moebius_xy((x, y)):
^
SyntaxError: invalid syntax
Executing on that 16.04 instance yields an error nearly identical to the Windows version:
~/pyLMS7002M/examples/VNA$ python3 calculateVNA_900M.py test900-01 save
Traceback (most recent call last):
File "calculateVNA_900M.py", line 25, in <module>
import smithplot
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/usr/local/lib/python3.5/dist-packages/pysmithplot-0.1.0-py3.5.egg/smithplot/__init__.py", line 2, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 954, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 896, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1139, in find_spec
File "<frozen importlib._bootstrap_external>", line 1115, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1096, in _legacy_get_spec
File "<frozen importlib._bootstrap>", line 444, in spec_from_loader
File "<frozen importlib._bootstrap_external>", line 533, in spec_from_file_location
File "/usr/local/lib/python3.5/dist-packages/pysmithplot-0.1.0-py3.5.egg/smithplot/smithaxes.py", line 1262
def _moebius_xy((x, y)):
^
SyntaxError: invalid syntax
Python modules:
:~/pyLMS7002M/examples/VNA$ pip3 list
chardet (2.3.0)
command-not-found (0.3)
cycler (0.10.0)
kiwisolver (1.0.1)
language-selector (0.1)
matplotlib (2.2.2)
numpy (1.14.2)
pip (8.1.1)
pycurl (7.43.0)
pygobject (3.20.0)
pyLMS7002M (1.2.0)
pyparsing (2.2.0)
pyserial (3.4)
pysmithplot (0.1.0)
python-apt (1.1.0b1+ubuntu0.16.4.1)
python-dateutil (2.7.2)
python-debian (0.1.27)
python-systemd (231)
pytz (2018.4)
pyusb (1.0.2)
requests (2.9.1)
setuptools (20.7.0)
six (1.10.0)
ssh-import-id (5.5)
ufw (0.35)
unattended-upgrades (0.1)
urllib3 (1.13.1)
virtualenv (15.0.1)
wheel (0.29.0)
Here is the source data if it would be of any help:
vna_test900-01_short_800000000.0_1000000000.0_201.txt
vna_test900-01_DUT_800000000.0_1000000000.0_201.txt