jktr / matplotlib-backend-kitty

show matplotlib plots directly in your kitty terminal
Creative Commons Zero v1.0 Universal
137 stars 16 forks source link

Working with Conda #2

Closed joaogui1 closed 2 years ago

joaogui1 commented 3 years ago

Since I'm using conda I don't have a set PYTHONPATH, can you help me out? I tried using conda develop and pointing to the repo, but despite it being added to the path. Output of python -c "import sys; print(sys.path)"

['', '/home/joaogui/miniconda3/lib/python37.zip', '/home/joaogui/miniconda3/lib/python3.7', '/home/joaogui/miniconda3/lib/python3.7/lib-dynload', '/home/joaogui/miniconda3/lib/python3.7/site-packages', '/home/joaogui/Downloads/matplotlib-backend-kitty']
wardw commented 3 years ago

I've not used Conda, but I suspect the path you want to set is to the folder containing your matplotlib-backend-kitty folder. In your case that would just be /home/joaogui/Downloads.

jktr commented 3 years ago

I don't use conda either, so I'm not sure if there's a recommended way to do this.

Adding /home/joaogui/miniconda3/lib/python3.7/site-packages to sys.path probably does not work as PYTHONPATH expects a list of directories containing packages instead of a list of packages.

You already seem to have a site-packages directory for conda at /home/joaogui/miniconda3/lib/python3.7/site-packages. I'd expect that cloning this repository to that directory would allow conda's python to pick it up.

If this works for you, I'll probably amend the readme to this effect.

alonsoC1s commented 3 years ago

Hello. I was having the same issue and I managed to solve it by cloning this repo into ~/user/miniconda3/envs/myenv/lib/python3.9/site-packages/IPython/extensions, where myenv is the name of the env I installed it to. Maybe it could be possible to makea package that does exactly this and publish it to conda-forge?

jktr commented 2 years ago

I've tried clarifying the usage of PYTHONPATH and site-packages directories in the readme.

I don't currently plan to publish packages for this in the pip or conda repositories.