Reputation:
In my Python Flask App I tried to install and use module zomatopy
after reading this:
https://github.com/sharadbhat/Zomatopy
After that I tried it in a simple code in my root route like this:
app = Flask(__name__)
config = {
"user_key": "my_defined_user_key"
}
zomato = zomatopy.initialize_app(config)
@app.route('/homepage')
def home():
category_dictionary = zomato.get_categories()
city_ID = zomato.get_city_ID("Belgrade")
city_name = zomato.get_city_name(city_ID)
return render_template('base.html')
if __name__ == '__main__':
app.run(debug=True)
But I keep getting this error(after a lot of reading and trying):
ModuleNotFoundError: No module named 'zomatopy'
Thanks.
Upvotes: 0
Views: 179
Reputation: 10372
When i use 'pip install zomatopy' to download and install module 'zomatopy', the name and content of the package installed by this method are not accurate.
(In the pip installation list of the current virtual environment, the package name is 'zomatopy-1.0.10.dist-info', not 'zomatopy'.).
You could try to download the 'zomatopy' in your link and put it in the same folder location as 'zomatopy-1.0.10.dist-info'.
If there is a wavy line, please reload VSCode.
In addition, pay attention to the use of virtual environments.
Upvotes: 0