Trying to install turtle in cmd (python) - python

after i write pip install turtle in cmd, this message in pressented to me.
anyone knows what to do??
C:\>pip install turtle
Collecting turtle
Using cached turtle-0.0.2.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Bruger\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-qv3xb6xg\\turtle\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-qv3xb6xg\\turtle\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Bruger\AppData\Local\Temp\pip-pip-egg-info-2tmj1fl2'
cwd: C:\Users\Bruger\AppData\Local\Temp\pip-install-qv3xb6xg\turtle\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Bruger\AppData\Local\Temp\pip-install-qv3xb6xg\turtle\setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

You already have turtle installed. However, if you get un error while trying to import turtle library, you most likely named your python file "turtle" so the module thinks you're trying to import the file that you're on instead of the real turtle file. So if that is the case try changing the name and it should be good to go!

You don't need to install turtle, it's already built in, and so, pip can't install it.

Try installing the PythonTurtle package. You can do this like this:
pip install PythonTurtle

Related

Python3-pip wont install package

I tried to install the turtle-package for python3 via pip. But it just returns an error. I recently switched to xubuntu and I am not sure what to do. Any help??
pip install turtle
The output I get is:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wewhl4kt/turtle/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wewhl4kt/turtle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ota0vbai
cwd: /tmp/pip-install-wewhl4kt/turtle/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-wewhl4kt/turtle/setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
If you want to install the PythonTurtle package, then from the PyPI website the command to write is
pip install PythonTurtle
or
python3 -m pip install --user PythonTurtle
PythonTurtle
It looks like the package you're downloading is broken. The maintainer of the project has probably abandoned the project. Are you sure that this is the package you want to be installing?

Cannot install xml.etree.elementtree in pycharm

Using cached pycopy-xml.etree.ElementTree-0.1.2.tar.gz (1.9 kB)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: 'F:\Python\venv\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pycharm-packaging\\pycopy-xml-etree-elementtree\\setup.py'"'"'; __file__='"'"'C:\\Users\\hp\\AppData\\Local\\Temp\\pycharm-packaging\\pycopy-xml-etree-elementtree\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\hp\AppData\Local\Temp\pip-pip-egg-info-ncg_nv94'
cwd: C:\Users\hp\AppData\Local\Temp\pycharm-packaging\pycopy-xml-etree-elementtree\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\hp\AppData\Local\Programs\Python\Python37-32\lib\tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\hp\\AppData\\Local\\Temp\\pycharm-packaging\\pycopy-xml-etree-elementtree\\setup.py'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
No, you don't need to install py-xml: the ElementTree API is part of the standard library of Python
here
In fact, py-xml is an old and probably obsolete package whose installation script appears to be only compatible with Python 2. One more reason why you don't need to install it!
If you would have just put the import statement in your code it would have worked without any issue in that regard.

How to install Vizdoom python

I am new to programming, I am trying to install vizdoom on windows 10, python. Using the command:
pip install vizdoom
and keep getting this error, I have tried searching around, have spent hours but am not able to fix it.
Collecting vizdoom Using cached vizdoom-1.1.7.tar.gz (4.9 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\USER\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe'
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-sqhbgmz4\\vizdoom\\setup.py'"'"';
__file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-sqhbgmz4\\vizdoom\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\USER\AppData\Local\Temp\pip-pip-egg-info-m7e2idad'
cwd: C:\Users\USER\AppData\Local\Temp\pip-install-sqhbgmz4\vizdoom\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\USER\AppData\Local\Temp\pip-install-sqhbgmz4\vizdoom\setup.py", line 14, in <module>
raise RuntimeError("Building pip package on Windows is not currently available ...")
RuntimeError: Building pip package on Windows is not currently available ...
---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
as a last resort, I hope to get some help from here.
Never mind, I switched to ubuntu.

Got an error while installing turtle library

The error given below:
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting turtle
Using cached turtle-0.0.2.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\soura\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\soura\\AppData\\
Local\\Temp\\pip-install-fovg_cud\\turtle\\setup.py'"'"'; __file__='"'"'C:\\Users\\soura\\AppData\\Local\\Temp\\pip-install-fovg_cud\\turtle\\setup.py'"'"';f=getattr
(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --eg
g-base 'C:\Users\soura\AppData\Local\Temp\pip-install-fovg_cud\turtle\pip-egg-info'
cwd: C:\Users\soura\AppData\Local\Temp\pip-install-fovg_cud\turtle\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\soura\AppData\Local\Temp\pip-install-fovg_cud\turtle\setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
In your code, you have a syntactic error next to an except in your code.
According to the error, you need to change line 1 to:
except ValueError:
#your code here
Hope this helps!!

Unable to install ssl in my local system using pip install ssl

I'm very new to python and when i tried to install some lib it is giving me this issue. can you please help on what to do.
When trying to install ssl using pip command it is giving me the below error
"pip install ssl"
Collecting ssl
Using cached https://files.pythonhosted.org/packages/83/21/f469c9923235f8c36d5fd5334ed11e2681abad7e0032c5aba964dcaf9bbb/ssl-1.16.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\users\rajesh_navaneeth\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\setup.py'"'"'; __file__='"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
long story short, don't install that python package. It's deprecated (shouldn't be installed in Python 2.6 and newer) and your python already includes ssl package.
In general you shouldn't even be able to install it via pip, but I guess that it's so old that setup.py didn't support version restrictions in the same way it does now.

Categories