I have tried to install a font I have in a ttf file in various ways using the many answers relating to this that I found on SO. Note: I have got the ttf file in the same folder as the code that I am running. I am trying to install this font so that I can use a mono-space font in kivy, so that tables format correctly. Here is what I tried:
I copied the function from this answer and added: install_font(r'C:\Users\User\Documents\python\SourceCodePro-Black.ttf') on to the end of the code and ran it. I got an error. PermissionError: [Errno 13] Permission denied: 'C:\\WINDOWS\\Fonts\\SourceCodePro-Black.ttf'
Tried to install it by using this method. It successfully installed fonttools, but it did not manage to import it somehow. I tried importing both fonttools and fontTools.
I also had a look at this answer but the comment underneath it suggested I shouldn't try that.
There doesn't seem to be a highly upvoted thread which details how to do this. What is the best method for doing this? Is it one of the above? And if so, what am I doing wrong?
Related
I am trying to use pyerbase in a django project and I keep getting this error.
I am on my 2nd or 3rd hour of research on how to get this to work and now I am running into this issues.
enter image description here
enter image description here
I have looked at all of the other stack overflow post about this issue. The long char path limit was already a 1 in my registry and I have a doubt that this was my problem in the first place. I tried a few other things like even trying to pip install the package directly into the folder that it is looking for.
enter image description here
I am just looking for another answer because the stuff that has been suggested is not working. An I noticed that the other questions are about scikit and tensorflow but none about pyerbase. I also check the site-packages for my venv and urllib3 is not in there.
so i cannot figure out how to install the pickle package to pycharm as i need it to call on other levels for my game i just cannot find the package on pycharm if anyone can help me or steer me to another thing like pycharm if anyone can help me with this it would be much appreciated i want to call on another level like you would call on a picture i have the right code for it just not the pickle package i have tried to research this problem but have not been able to get a solid answer so i turned to stack overflow as a last option
If you want to check if pickle present in pycharm or not by executing in cmd after entering into python in cmd.
help("modules")
check pickle module in it, If not try installing by
pip install pickle5
from pickle5 import pickle
If you still gets error please let me know
I'm using anaconda3 and facing such problem:
FileNotFoundError: [Errno 2] No such file or directory 'C:\Users\pobox\.matplotlib\fontlist-v300.json'
And the fact is in the folder .matplotlib I didn't find such file fontlist-v300.json.
I know the problem may be connected with the matplotlib, but the problem is occuring even after updating the version of matplotlib.
Any ideas how to fix it?
my screenshot
Based from the update of the issue https://github.com/matplotlib/matplotlib/issues/12173/, you could try update matplotlib to the latest version. But people still reporting the problems persists, so the bug might still in works.
You could try this option, and match it with your current Python environments
For the file itself, you may try to check this: https://gitlab.lagash.com/josemg/sofy-luis-quality/blob/b1ddf1ec3577bdec0d798c8586c30b6d6fc10f5f/.cache/matplotlib/fontlist-v300.json
Not sure what is going on here, but I get the following error when trying to install python-docx on my server:
ERROR conda.core.link:_execute(700): An error occurred while installing package 'conda-forge::lxml-4.5.0-py38hbb43d70_1'.
[Errno 13] Pewrmission denied: '.../anaconda3/envs/django_env/lib/python3.8/site-packages/lxml/ElementInclude.py
The thing is, there is no such file that I can find in that location, so not sure what this is all about, any help would be appreciated, I've not found anything at all on google relating to this.
This is now solved, but my solution was to uninstall Anaconda and reinstall it. This error occurred because the original error advised me to rename or manually delete the ElementInclude.py file. So I did that knowing it was only the Anaconda distribution not a linux system file, but it broke the my website anyway. The fault initially cropped up, as we were trying to use Anaconda on another account whilst it was installed on my account. Anaconda3 is now installed in root so that it is accessible by all users now. I still had to set it to PATH on each of the two accounts that wanted access, but doing that python-docx installed with no issues.
Im using the reportlab framework for creating pdf's. I'm also using a custom font in my pdf's called '3of9'. Now, sometimes I'm getting the following error:
IOError: Cannot open resource "/usr/lib/python2.6/site-packages/reportlab/fonts/LeERC___.AFM", while looking for faceName='3of9'
This doesn't happens everytime, but too often. And in most of the cases everything works well, so I have no idea why the error comes up.
Has anyone an idea how to solve this?
either make sure you have LeERC___.AFM at the given path or try to upgrade to a more recent reportlab version.
LeERC___.AFM is part of the reportlab distribution to version 2.1 (which can be downloaded at
http://www.reportlab.com/ftp/ReportLab_2_1.zip)