Last active
January 30, 2020 16:50
-
-
Save simon-contreras-deel/53714464ba0e9057ea7b448309ea20cd to your computer and use it in GitHub Desktop.
[Python env 101] #python #jupyter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install -e . | |
pip install jupyter pytest pytest-mock | |
pytest or pytest test/test_context.py::TestCartoContext::test_cartocontext_write |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3 -m venv env | |
source env/bin/activate | |
deactivate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
activate the environment where you want to install the local package | |
cd path/to/package | |
python setup.py install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip freeze | grep -v "^-e" | xargs pip uninstall -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The problem is the path of the project is not in the PATH. To check it: | |
import sys | |
print(sys.path) | |
To add it to .bashrc: | |
export PYTHONPATH='/home/simon/dev/cartoframes' | |
----------------------------- | |
Other solution could be install the project using -e | |
pip install -e . | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment