Reputation: 67
I am on MacOS.
I am trying to write an ETL module for myself but I'm getting hung up on the fact that I cannot seem to get SQLAlchemy to install itself in my python 3.7 directory. It is installing itself fine in my 2.7 folder, even when I specify:
sudo pip3 install sqlalchemy
This is driving me nuts! I'd love any advice on the matter.
Below is what I am doing exactly:
User-MacBook-Pro:2.7 User$ pip3 install sqlalchemy --user
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting sqlalchemy
Installing collected packages: sqlalchemy
Successfully installed sqlalchemy-1.3.2
User-MacBook-Pro:2.7 User$ python3
Python 3.7.3 (default, Mar 27 2019, 09:23:15)
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'sqlalchemy'
>>>
User-MacBook-Pro:2.7 User$ pip3 uninstall sqlalchemy
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Uninstalling SQLAlchemy-1.3.2:
Would remove:
/Users/User/Library/Python/2.7/lib/python/site-packages/SQLAlchemy-1.3.2.dist-info/*
/Users/User/Library/Python/2.7/lib/python/site-packages/sqlalchemy/*
Proceed (y/n)? y
Successfully uninstalled SQLAlchemy-1.3.2
User-MacBook-Pro:2.7 User$
Upvotes: 0
Views: 817
Reputation: 404
Try
pip3 -V
which will give something like this
pip 19.0.3 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip (python 2.7)
so you can know where your pip installation is. As an alternative to install the given module you can try
python3 -m pip install sqlalchemy
Upvotes: 1