I already installed loguru and everything looks fine.
However, everytime I try to import it, I get the message ModuleNotfound. I have Python 3.11, and this is only happening with this package.
Does anyone knows what is the problem and how can i solve it?
Thanks
Related
I am fairly new to TensorFlow and just installed it with CPU-support-only version following to this: https://www.tensorflow.org/install/install_linux
My Ubuntu is 16.04 and python installed is 2.7.13. I chose "native" pip installation.
The download and install process went though smoothly, however, when I tried to import Tensorflow and use it, it returns following error;
ImportError: /usr/local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyUnicodeUCS4_FromString
I have got no clue how to solve it after crawling in google.
If you know some idea on how to solve this and could give me some advice, much appreciated.
Thank you so much in advance!
It's because your python is built with UCS2, which is incompatible with the one assumed by tensorflow (UCS4). So either you build your python with UCS4 (--enable-unicode=ucs4) or build tensorflow from source may solve this issue, I guess.
I have installed python 2.7, 3.5, Anaconda2 and Anaconda3. I cannot get spyder v3.01, 3.00, 2.3.9, or 2.3.8 to launch in any of these environments. From the command line, typing spyder or even python spyder --reset result in
Segmentation fault (core dumped)
Has anyone else experienced this? Is there a fix?
Okay I finally figured out the problem, which likely only affects those who have first tried to install things like spyder in their default python distribution (even if this was later "removed"). The solution was first to start a python shell and check sys.path:
>>> import sys
>>> sys.path
Make sure all the listed paths are within your current python environment. For me, all paths included my anaconda installation path except one, which started with /home/jack/.local. Not sure how that got in there. Removing this from the path (using sys.path.pop() or sys.path.remove() in python fixed the problem.
To permanently fix the problem, I simply removed the "leftovers" from previously installed python packages that were hanging around in my .local directory. Now everything is great.
Thanks to Carlos Cordoba for the hints, and (more importantly) for spyder!
Cheers!
i am trying to install Selenium on my computer.
I downloaded Python and as far as i know PiP is already installed, but when i write in my command prompt "pip" , nothing happends, it just sits there and does nothing and i can't write in the console anymore, like its loading.
If i write Python in the console there comes up version and commands work as they should in the Python Client.
I do add the right paths and i double check alot of times.
Anyone had this problem? tried pretty much every solution out there.
I have a python program which I've successfully packaged up as a single exe using pyinstaller in the past. Recently I added new features which make use of the google api python client ( https://developers.google.com/api-client-library/python/ ). I've attempted to make a new single exe package of the new version and it fails to run.
I enable debugging and the console and initially the issue was that it hadn't picked up the oauth lib. I fixed that by adding the following to my spec file:
hiddenimports=['googleapiclient', 'apiclient']
When I build I can see this:
53092 INFO: Hidden import 'googleapiclient' has been found otherwise
53093 INFO: Hidden import 'apiclient' has been found otherwise
However, now when I run the rebuilt exe I get the following error before it exits:
pkg_resources.DistributionNotFound: google-api-python-client
I can't see any reference to that and I'm not sure how to force it to be packaged up with the exe.
I figure I can't be the only person to have ever wanted to package up a python program that makes use of the google api, but I failed to find any help during a lot of time with my friend google...
Any tips?
Many People Have same question but I can't find any answer
Try This way
find site package of your project
enter the Pyinstaller/hooks and find hokk-google.api_core.py
add line ( edit line ) datas += copy_metadata('google-api-python-client')
example
from PyInstaller.utils.hooks import copy_metadata
datas = copy_metadata('google-api-core')
datas += copy_metadata('google-api-python-client')
excute pyinstaller hidden-import google-api-python-client
pyinstaller --hidden-import google-api-python-client
you can avoid error
pkg_resources.DistributionNotFound: google-api-python-client
I was able to dig deeper into this issue after I switched from using pip to easy_install to install the google-api-python-client package. Manually installing the egg file gave me a much neater way of testing.
I then started building using pyinstaller with out the --onefile option, this way I was able to start messing with the egg file that was packaged up with my program. Eventually I found out that my problem was stemming from the fact I'm making use of Pandas and the Google API.
Here's the relevant Pandas bug on github.
To solve the problem I had to update my version of Pandas.
I did find that if I moved to the most recent version of Pandas (1.6.0) I ran into a new issue because it imports dateutil and it causes problems looking for the zoneinfo file. I've landed on Pandas 1.5.1 and it is all working.
You can also add site-packages using:
--add-data "path_to_your_package:package_name(e.g googleapiclient)"
I am using django-address in a Django 1.7 project and I get an ImportError whenever I try to create an object containing at least one AddressField.
The traceback says
cannot import name GoogleMapsError
The exception is thrown by this particular import statement:
from googlemaps import GoogleMapsError
I tried to manually install googlemaps from pip but it did not help because GoogleMapsError could not be found in the module. The instructions from django-address do not mention any explicit dependency so I'm a bit confused.
Any advice on this?
Looks like django-address code was based on:
http://sourceforge.net/p/py-googlemaps/code/HEAD/tree/trunk/googlemaps/googlemaps.py
(which it seems you'd get by pip install googlemaps==1.0.2 https://pypi.python.org/pypi/googlemaps/1.0.2)
However there is a newer version of googlemaps https://pypi.python.org/pypi/googlemaps/2.0 which is what you'd get if you just pip install googlemaps now... and this has different code:
https://github.com/googlemaps/google-maps-services-python
So, I believe that pip install googlemaps==1.0.2 should fix your problem.
Actually that reference to GoogleMapsError is from an older version of django-address and is now unused. I've removed it from the code and, consequently, the dependence on py-googlemaps. Please try reinstalling the latest version of django-address from the Github repository. Thanks!