SQLAlchemy: verschil tussen versies

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
(Nieuwe pagina aangemaakt met '== Installatie SQLAlchemy (okt. 2018 - Python 2.7) == * [https://pypi.org/project/SQLAlchemy/#files Download] .tar.gz-bestand naar * Pak het bestand uit en plaats...')
 
Regel 1: Regel 1:
== Installatie SQLAlchemy (okt. 2018 - Python 2.7) ==
+
== Installatie (okt. 2018 - Python 2.7) ==
  
 
* [https://pypi.org/project/SQLAlchemy/#files Download] .tar.gz-bestand naar  
 
* [https://pypi.org/project/SQLAlchemy/#files Download] .tar.gz-bestand naar  
Regel 14: Regel 14:
 
>>> sqlalchemy.__version__
 
>>> sqlalchemy.__version__
 
'1.2.12'
 
'1.2.12'
 +
</pre>
 +
 +
== Uninstall (jan. 2019 - Python 2.7) ==
 +
 +
Dit gaf een permissie-foutmelding:
 +
 +
<pre>
 +
pip uninstall sqlalchemy
 +
 +
/home/strompf/.local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
 +
  warnings.warn(warning, RequestsDependencyWarning)
 +
Uninstalling SQLAlchemy-1.2.12:
 +
  Would remove:
 +
    /usr/local/lib/python2.7/dist-packages/SQLAlchemy-1.2.12-py2.7-linux-x86_64.egg
 +
 +
Exception:
 +
Traceback (most recent call last):
 +
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
 +
    status = self.run(options, args)
 +
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/commands/uninstall.py", line 75, in run
 +
    auto_confirm=options.yes, verbose=self.verbosity > 0,
 +
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 683, in uninstall
 +
    uninstalled_pathset.remove(auto_confirm, verbose)
 +
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/req/req_uninstall.py", line 224, in remove
 +
    renames(path, new_path)
 +
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 280, in renames
 +
    shutil.move(old, new)
 +
  File "/usr/lib/python2.7/shutil.py", line 303, in move
 +
    os.unlink(src)
 +
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/SQLAlchemy-1.2.12-py2.7-linux-x86_64.egg'
 +
</pre>
 +
 +
Dit werkte wel:
 +
 +
<pre>
 +
cd /home/strompf/.local/bin
 +
sudo pip uninstall sqlalchemy
 +
 +
/home/strompf/.local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
 +
  warnings.warn(warning, RequestsDependencyWarning)
 +
The directory '/home/strompf/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
 +
Uninstalling SQLAlchemy-1.2.12:
 +
  Would remove:
 +
    /usr/local/lib/python2.7/dist-packages/SQLAlchemy-1.2.12-py2.7-linux-x86_64.egg
 +
Proceed (y/n)? y
 +
  Successfully uninstalled SQLAlchemy-1.2.12
 
</pre>
 
</pre>
  
 
== Installatie SQLAlchemy (jan. 2019 - Python 3.x) ==
 
== Installatie SQLAlchemy (jan. 2019 - Python 3.x) ==

Versie van 14 jan 2019 14:59

Installatie (okt. 2018 - Python 2.7)

  • Download .tar.gz-bestand naar
  • Pak het bestand uit en plaats inhoud in een map onder /usr/local/bin/ In mijn geval is dat map /usr/local/bin/SQLAlchemy-1.2.12
  • python setup.py install - Alleen C-gedeelte lukt niet
  • Test: Ga naar een andere map (m'n projetmap in dit geval):
python
Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
>>> sqlalchemy.__version__
'1.2.12'

Uninstall (jan. 2019 - Python 2.7)

Dit gaf een permissie-foutmelding:

pip uninstall sqlalchemy

/home/strompf/.local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
Uninstalling SQLAlchemy-1.2.12:
  Would remove:
    /usr/local/lib/python2.7/dist-packages/SQLAlchemy-1.2.12-py2.7-linux-x86_64.egg

Exception:
Traceback (most recent call last):
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 143, in main
    status = self.run(options, args)
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/commands/uninstall.py", line 75, in run
    auto_confirm=options.yes, verbose=self.verbosity > 0,
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 683, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/req/req_uninstall.py", line 224, in remove
    renames(path, new_path)
  File "/home/strompf/.local/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 280, in renames
    shutil.move(old, new)
  File "/usr/lib/python2.7/shutil.py", line 303, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/SQLAlchemy-1.2.12-py2.7-linux-x86_64.egg'

Dit werkte wel:

cd /home/strompf/.local/bin
sudo pip uninstall sqlalchemy

/home/strompf/.local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
The directory '/home/strompf/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Uninstalling SQLAlchemy-1.2.12:
  Would remove:
    /usr/local/lib/python2.7/dist-packages/SQLAlchemy-1.2.12-py2.7-linux-x86_64.egg
Proceed (y/n)? y
  Successfully uninstalled SQLAlchemy-1.2.12

Installatie SQLAlchemy (jan. 2019 - Python 3.x)