I am creating a development environment with Python to work with cassandra, but I am not able to install Cassandra Driver when I try to install it with the command in Windows 8.1 Power Shell. "\ PIP INSTALL CASSANDRA-DRIVER" and I have the following message error:
Running setup.py install for cassandra-driver ... error
Exception:
Traceback (most recent call last):
File "c:\users\rodrigoaugusto\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat__init__.py", lin
e 73, in console_to_str
return s.decode(sys.stdout.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 9: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\rodrigoaugusto\appdata\local\programs\python\python36-32\lib\site-packages\pip\basecommand.py", line 21
5, in main
status = self.run(options, args)
File "c:\users\rodrigoaugusto\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", li
ne 342, in run
prefix=options.prefix_path,
File "c:\users\rodrigoaugusto\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 78
4, in install
**kwargs
File "c:\users\rodrigoaugusto\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_install.py", lin
e 878, in install
spinner=spinner,
File "c:\users\rodrigoaugusto\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils__init__.py", line
676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\users\rodrigoaugusto\appdata\local\programs\python\python36-32\lib\site-packages\pip\compat__init__.py", lin
e 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 9: invalid continuation byte
Could someone help me ?, my current scenario and the following, Operating System: Windows 8.1 Python 3.6 and I am using ANACONDA / Jupyter Notebook to develop.
This issue is due to pip, but not cassandra. Please refer to here for more details. You can also find a few workaround as well. My recommendation is to use python 2 as it's more stable (unless there is specific requirement for python3)
Related
Command print(u'\u2588') works well in Python Online Compiler https://repl.it/languages/python3 but not in Raspberry pi through a windows 10 terminal using Putty. Following error appears:
>>> print('\u2588')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character '\u2588' in position 0: ordinal not in range(128)
I would appretiatte if someone could help...
Problem got resolved with a fresh install of Raspbian Buster with Python 3.7.3 (previously I had Python 3.5).
This might have been the root cause...
I've always used pip in installing python packages but for some unexplained reason it just stopped working. I have tried the following but still not working
i upgraded pip
i rolled back pip
-i uninstalled my python distribution and reinstalled/upgraded it. Here is a trace back of the kind of error i get whenever i try
installing a package with pip
OS- windows 10
pip install profanity
Collecting profanity
Using cached https://files.pythonhosted.org/packages/f6/b4/07d53456462e26eee50abcae787c9380c01731ccc0b6c96233770e546989/profanity-1.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "C:\Users\MEME\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources\__init__.py", line 2698, in get_entry_map
ep_map = self._ep_map
File "C:\Users\MEME\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources\__init__.py", line 2669, in __getattr__
raise AttributeError(attr)
AttributeError: _ep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\MEME\AppData\Local\Temp\pip-install-xg7obvs0\profanity\setup.py", line 72, in <module>
['profanity=profanity:main'],
File "C:\Users\MEME\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "C:\Users\MEME\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\__init__.py", line 117, in _install_setup_requires
(k, v) for k, v in attrs.items()
File "C:\Users\MEME\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\dist.py", line 370, in __init__
for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
File "C:\Users\MEME\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources\__init__.py", line 645, in iter_entry_points
entries = dist.get_entry_map(group)
File "C:\Users\MEME\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources\__init__.py", line 2701, in get_entry_map
self._get_metadata('entry_points.txt'), self
File "C:\Users\MEME\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources\__init__.py", line 2412, in parse_map
raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\MEME\AppData\Local\Temp\pip-install-xg7obvs0\profanity\
I have created a small game for my little boy using Python 3.4 and Pygame in Windows 7. It also works in Python 2.X, with some minor bugs.
Then I tried to create an .exe file using py2exe. I prepared a setup.py file copying the source I found at pygame2exe wiki (http://www.pygame.org/wiki/Pygame2exe?parent=CookBook) also trying to use the suggestions I found in other questions here and in python-forum. What I obtained was the following error:
C:\Python34>python setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in
origIsSystemDLL = py2exe.build_exe.isSystemDLL # save the orginal before we edit it
AttributeError: 'module' object has no attribute 'build_exe'
I have read all other posts on stackoverflow on pygame and exe but I haven’t found anything on this type of error on the web, is there anybody that can help me?
PS for those who prefer cx_freeze, I have tried it too, finding different problems and I will prepare soon another question on it
To give you more details, I am adding this new lines:
if I use the standard setup.py file instead, I have a dist directory with an .exe, but if I launch it I get an error window and in the log I find:
Traceback (most recent call last):
File "C:\Python34\lib\tokenize.py",
line 369, in find_cookie
line_string = line.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte
During handling of the above exception, another exception occurred: etc....
And the first lines in the cmd are about 16 missing modules
if I try to use Python 2.6 instead of 3.4 I otain a Microsoft Visual C++ runtime error with the pygame2exe version, and a similar comment in the log if I use the 'short' py2exe version (Traceback (most recent call last):
File "Nomi_Animali_1.1p.py", line 100, in
basicFont = pygame.font.SysFont("FreeSansBold.ttf", 72)
File "pygame__init__.pyc", line 70, in getattr
NotImplementedError: font module not available
(ImportError: DLL load failed: Impossibile trovare il modulo specificato.))
I have tried in all cases to use as font: None, "Arial", "FreeSansBold.ttf"
Just import py2exe.build_exe again will work
>>> import py2exe
>>> py2exe.build_exe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'build_exe'
>>> import py2exe.build_exe
>>> py2exe.build_exe
<module 'py2exe.build_exe' from 'C:\\Python34\\lib\\site-packages\\py2exe\\build_exe.py'>
I'm trying to install the python package tabulate by running pip3 install tabulate on Archlinux but i got the following error:
Downloading/unpacking tabulate
Downloading tabulate-0.6.tar.gz
Running setup.py egg_info for package tabulate
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip_build_user/tabulate/setup.py", line 8, in <module>
LONG_DESCRIPTION = open("README.rst").read().replace("`_", "`")
File "/usr/lib/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 8035: ordinal
not in range(128)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/tmp/pip_build_user/tabulate/setup.py", line 8, in <module>
LONG_DESCRIPTION = open("README.rst").read().replace("`_", "`")
File "/usr/lib/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 8035: ordinal not in range(128)
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_user/tabulate
`Storing complete log in /home/user/.pip/pip.log
I'm running:
python -V -> Python 3.3.2
pip3 -V -> pip 1.4.1 from /usr/lib/python3.3/site-packages (python 3.3)
I have successfully installed other packages by pip and I don't know why this occurs suddenly. Can anyone tell me how to fix this problem?
Solution
It looked like a locale issue on my OS. Had to overwrite the global LANG environment variable to LANG="en_US.UTF-8".
Solution It looked like a locale issue on my OS. Had to overwrite the global LANG environment variable to LANG="en_US.UTF-8".
I have no problems with using pip/install pyramid_mongodb on a production server.
However, when it comes to pyramid_jinja2, this problem keeps popping up and it's driving me nuts. I have used pip/install and easy_install, but both doesn't seem to work.
I'm using python3.3
How should I resolve this?
root#vre [/home/vrnet/public_html/env]# sudo -u vrnet ./bin/pip install pyramid_jinja2
Downloading/unpacking pyramid-jinja2
Running setup.py egg_info for package pyramid-jinja2
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/vrnet/public_html/env/build/pyramid-jinja2/setup.py", line 21, in <module>
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
File "/home/vrnet/public_html/env/lib64/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 131: ordinal not in range(128)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/vrnet/public_html/env/build/pyramid-jinja2/setup.py", line 21, in <module>
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
File "/home/vrnet/public_html/env/lib64/python3.3/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 131: ordinal not in range(128)
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/vrnet/public_html/env/build/pyramid-jinja2
The package changelog has non-ascii characters in the file, breaking the package installation. I've filed a bug report about this.
You'll have to take that up with the developers, or switch to Python 2 or a different template engine instead.