I am new to python so this could be a wrong question to ask .I have installed python 3.4 and is trying to convert an old project of python 2.2 to python 3.
I have the pythonpath as "C:\ABC;C:\XY"
I do have the following structure :
In the install.py, there is code to import MiscUtils.Utils1.py:
from MiscUtils import Utils1
But in the Utils1.py , another code is there to import Utils2.py:
from UserUtils import Utils2
When I execute the install.py, I am getting the following error:
"No module named Utils2"
I tried many a things but its not working. If I put in the Utils1.py the following:
from .UserUtils import Utils2
I am getting "No Module named MiscUtils.UserUtils"
How can I import all these modules correctly
?
Related
I'm using a Python library (pyPyrTools), which is giving me an import error.
../../../venv/lib/python3.8/site-packages/pyPyrTools/__init__.py:1: in <module>
from binomialFilter import binomialFilter
E ModuleNotFoundError: No module named 'binomialFilter'
Inspecting the module in venv/lib/site-packages, I find the following structure:
-pyPyrTools
---__init__.py
---binomialFilter.py
And inspecting __init__.py, it's a pretty standard fare import:
from binomialFilter import binomialFilter
binomialFilter.py does include a function called binomialFilter.
Any idea why I'm getting this error from this library? There aren't any relative imports or anything funky, and the files all exist on the right level. It all looks correct to me.
The module looks like it was written for 2.7, and I'm using 3.8 if that is relevant.
I was going through an Reinforcement Learning Course and wanted to try running the code locally. I installed RLGlue with pip install rlglue from here
But then when trying to run the code:
from rlglue.rl_glue import RLGlue
import main_agent
import ten_arm_env
import test_env
Received this error message:
ModuleNotFoundError: No module named 'rlglue.rl_glue'
Any idea on how to fix that to import the module?
I use this as work-around, add this file to your project.
https://gist.github.com/niektuytel/eab1117070454042b11e5e5c026dd3fb
I am trying import 'simplejson'module into in my pycharm project. It is throwing an error saying that import simplejson as json
ModuleNotFoundError: No module named 'simplejson'
I installed simple json in the terminal using pip3 install simplejson.
I have tried not renaming it as json but that didn't work.
From azure.mgmt.network.operations import NetworkSecurityGroupsOperations
ImportError: No module named operations
Error in importing submodule operations from this package
Version of the package is: azure-Mgmt-network==2.0.0 rc2
You can use code like below to import NetworkSecurityGroupsOperations:
from azure.mgmt.network.v2017_09_01.operations.network_security_groups_operations import NetworkSecurityGroupsOperations
You can get more details with this link and you can change the v2017_09_01 with which version you need.
I am trying to import TouchRippleBehavior in Kivy using this:
from kivy.uix.behaviors.touchripple import TouchRippleBehavior
However, it throws:
ModuleNotFoundError: No module named 'kivy.uix.behaviors.touchripple'
Currently I am using Python 2.7, 3.5.2, and 3.6.4(pyenv). I tried on all versions but got same error.