I have a new macbook then I need to reconfigure my tools. Python 3 in installed throught brew, virtualenv and virtualwrapper are installed with pip. When I create a new environnement, I can use pip to install packages but python does not see them. Python can only use the packages installed outside the virtualenv. Any idea to solve it ?
mbp:f4mily-1st sebastienmorele$ mkvirtualenv test
Using base prefix '/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7'
New python executable in /Users/sebastienmorele/.virtualenvs/test/bin/python3.7
Also creating executable in /Users/sebastienmorele/.virtualenvs/test/bin/python
Installing setuptools, pip, wheel...
done.
virtualenvwrapper.user_scripts creating /Users/sebastienmorele/.virtualenvs/test/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/sebastienmorele/.virtualenvs/test/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/sebastienmorele/.virtualenvs/test/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/sebastienmorele/.virtualenvs/test/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/sebastienmorele/.virtualenvs/test/bin/get_env_details
(test) mbp:f4mily-1st sebastienmorele$ pip install selenium
Collecting selenium
Using cached https://files.pythonhosted.org/packages/80/d6/4294f0b4bce4de0abf13e17190289f9d0613b0a44e5dd6a7f5ca98459853/selenium-3.141.0-py2.py3-none-any.whl
Collecting urllib3 (from selenium)
Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl
Installing collected packages: urllib3, selenium
Successfully installed selenium-3.141.0 urllib3-1.25.3
(test) mbp:f4mily-1st sebastienmorele$ python
Python 3.7.4 (default, Sep 7 2019, 18:27:02)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'selenium'
>>>
(test) mbp:f4mily-1st sebastienmorele$
(test) mbp:f4mily-1st sebastienmorele$ deactivate
mbp:f4mily-1st sebastienmorele$ pip list
Package Version
----------------- -------
pbr 5.4.3
pip 19.2.3
setuptools 41.0.1
six 1.12.0
stevedore 1.31.0
urllib3 1.25.3
virtualenv 16.7.5
virtualenv-clone 0.5.3
virtualenvwrapper 4.8.4
wheel 0.33.4
mbp:f4mily-1st sebastienmorele$ pip install selenium
Collecting selenium
Using cached https://files.pythonhosted.org/packages/80/d6/4294f0b4bce4de0abf13e17190289f9d0613b0a44e5dd6a7f5ca98459853/selenium-3.141.0-py2.py3-none-any.whl
Requirement already satisfied: urllib3 in /usr/local/lib/python3.7/site-packages (from selenium) (1.25.3)
Installing collected packages: selenium
Successfully installed selenium-3.141.0
mbp:f4mily-1st sebastienmorele$ workon test
(test) mbp:f4mily-1st sebastienmorele$ python
Python 3.7.4 (default, Sep 7 2019, 18:27:02)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
>>>