Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save simon-contreras-deel/53714464ba0e9057ea7b448309ea20cd to your computer and use it in GitHub Desktop.
Save simon-contreras-deel/53714464ba0e9057ea7b448309ea20cd to your computer and use it in GitHub Desktop.
[Python env 101] #python #jupyter
pip install -e .
pip install jupyter pytest pytest-mock
pytest or pytest test/test_context.py::TestCartoContext::test_cartocontext_write
python3 -m venv env
source env/bin/activate
deactivate
activate the environment where you want to install the local package
cd path/to/package
python setup.py install
pip freeze | grep -v "^-e" | xargs pip uninstall -y
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