ich habe auf meinem Desktop PC Python uns spiel damit gerne mal etwas rum. Habe vor 2 Monaten einen neuen Kurs angefangen und damals mich rumgequält mit den Python Versionen.
Hatte einen Haufen Python Versionen auf dem Mac und es irgendwie geschafft alle bis auf die Standard 2.7 zu löschen. Daraufhin hatte ich die Version 3.10.2 installiert. Darüberhinaus konnte ich ein virtialinviroment erstellen und auf dem Editor Atom den auch so einstellen dass ich darauf Zugang habe. Soweit schön und Gut. Heute, zwei Monate später: Ich habe wieder etwas Zeit und wollte den Kurs anfangen. Ich müsste pandas installieren aber bekomme es beim Besten Willen nicht hin. In Atom bekomme ich folgende Meldung
Code: Alles auswählen
File "/Users/stelio/venv/FCCML/Ohne Titel.py", line 1
pip install pandas
^^^^^^^
SyntaxError: invalid syntax
Bin ich im „python3“ „ordner?“ im Terminal, kommt sowohl bei
sudo easy_install pip
als auch
easy_install pip
folgende Meldung:
Code: Alles auswählen
File "<stdin>", line 1
sudo easy_install pip
Code: Alles auswählen
Searching for pip
Reading https://pypi.org/simple/pip/
Downloading https://files.pythonhosted.org/packages/99/bb/696e256f4f445809f25efd4e4ce42ff99664dc089cafa1e097d5fec7fc33/pip-22.1.tar.gz#sha256=2debf847016cfe643fa1512e2d781d3ca9e5c878ba0652583842d50cc2bcc605
Best match: pip 22.1
Processing pip-22.1.tar.gz
Writing /tmp/easy_install-vhc1_3/pip-22.1/setup.cfg
Running pip-22.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-vhc1_3/pip-22.1/egg-dist-tmp-MWvrhq
Traceback (most recent call last):
File "/usr/bin/easy_install", line 13, in <module>
load_entry_point('setuptools==41.0.1', 'console_scripts', 'easy_install')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 2316, in main
**kw
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 418, in run
self.easy_install(spec, not self.no_deps)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 253, in run_setup
raise
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 195, in setup_context
yield
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 195, in setup_context
yield
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 44, in _execfile
code = compile(script, filename, 'exec')
File "/tmp/easy_install-vhc1_3/pip-22.1/setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
Code: Alles auswählen
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18190.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Library/Python/2.7/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.
Zugang zu irgendwas hab ich auch nicht, wirft mir direkt eine Error Meldung.
Ich hab also Python auf dem Macbook dass ich nur für ein print(„hello world“) nutzen kann.
Wie bekomme ich meinen Mac wieder sauber, rafft einfach nicht und weiß auch im besten Willen nicht mehr wie ich das virtuelle Environment von vor zwei Monaten installiert bekommen hab...
Vielen Dank schonmal
Grüße
Stelio