Issue with offline installation: importing gives syntax error
haykp opened this issue · 5 comments
haykp commented
We were able to download package and install offline mode.
When doing pip3 list it shows that cocotb-pcie is installed:
**/Python-3.9.6/bin/pip3 list
Package Version
-------------- ----------
cocotb 1.6.0.dev0
cocotb-bus 0.0.0
cocotbext-axi 0.1.13
cocotbext-pcie 0.1.15
electrical 1.0.0
more-itertools 8.8.0
pip 21.1.3
setuptools 56.0.0
simulator 1.0.3
version 0.1.2
However when importing in python, it gives strange error:
python3
Python 3.9.6 (default, Aug 5 2021, 10:07:49)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cocotbext-pcie
File "<stdin>", line 1
import cocotbext-pcie
^
SyntaxError: invalid syntax
Any ideas what is this?
alexforencich commented
It's a namespace package. Import it as cocotbext.pcie
.
haykp commented
Same error is there:
> import cocotbext.pcie
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cocotbext'
alexforencich commented
That's not the same error, it's no longer a syntax error. Looks like you don't actually have the package installed. Do you possibly have multiple python installations?
haykp commented
actually no, so strange.
The package installation passed good
Installed /user/t2068243/petro/Python-3.9.6/lib/python3.9/site-packages/cocotbext_pcie-0.1.15-py3.9.egg
Processing dependencies for cocotbext-pcie==0.1.15
Searching for cocotbext-axi==0.1.13
Best match: cocotbext-axi 0.1.13
Processing cocotbext_axi-0.1.13-py3.9.egg
cocotbext-axi 0.1.13 is already the active version in easy-install.pth
Using /user/t2068243/petro/Python-3.9.6/lib/python3.9/site-packages/cocotbext_axi-0.1.13-py3.9.egg
Searching for cocotb==1.6.0.dev0
Best match: cocotb 1.6.0.dev0
Processing cocotb-1.6.0.dev0-py3.9-linux-x86_64.egg
cocotb 1.6.0.dev0 is already the active version in easy-install.pth
Installing cocotb-config script to /user/t2068243/petro/Python-3.9.6/bin
Using /user/t2068243/petro/Python-3.9.6/lib/python3.9/site-packages/cocotb-1.6.0.dev0-py3.9-linux-x86_64.egg
Searching for cocotb-bus==0.0.0
Best match: cocotb-bus 0.0.0
Processing cocotb_bus-0.0.0-py3.9.egg
cocotb-bus 0.0.0 is already the active version in easy-install.pth
Using /user/t2068243/petro/Python-3.9.6/lib/python3.9/site-packages/cocotb_bus-0.0.0-py3.9.egg
Finished processing dependencies for cocotbext-pcie==0.1.15
alexforencich commented
well, in that case I have no idea what the issue is. You should be able to import that, though:
$ python
Python 3.9.6 (default, Jun 30 2021, 10:22:16)
[GCC 11.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cocotbext.pcie
>>>