$ schtex drawing.sch drawing.png
When I try to run the above code it says that I don't have pidflatex installed even though I have pip installed latex, tex, and pdflatex.
I have also run the following lines when testing another piece of code and it failed to obtain anything:
from sympy.utilities.misc import find_executable
find_executable('latex')
It also gave me an error
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/bin/schtex", line 8, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/scripts/schtex.py", line 231, in main
cct.draw(label_nodes=args.label_nodes,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/netlistmixin.py", line 1624, in draw
return cct.sch.draw(filename=filename, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/schematic.py", line 792, in draw
self.tikz_draw(filename=filename, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/schematic.py", line 597, in tikz_draw
self.circuitikz_date, self.circuitikz_version = latexrunner.circuitikz_version()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/system.py", line 230, in circuitikz_version
self.run(tex_filename)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/system.py", line 183, in run
checkexe('pdflatex')
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/lcapy/system.py", line 68, in checkexe
raise RuntimeError('%s is not installed' % program)
RuntimeError: pdflatex is not installed
From my experience, running these packages require to actually have a LaTeX distribution installed on your computer (which contains pdflatex).
I would recommend you using teXlive, which is one of the most common : https://www.tug.org/texlive/
You could also use MikTeX which is also a very common distribution : https://miktex.org/
Related
I am having an issue with a program, which uses panda3d. It works perfectly when executed as a pythonscript, but the version, which is compiled (or rather packaged) by PyInstaller throws the exception below.
:display(warning): Unable to load libpandagl.so: No error.
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
File "Shipsim3d_1-1.py", line 930, in <module>
File "Shipsim3d_1-1.py", line 23, in __init__
File "direct/showbase/ShowBase.py", line 339, in __init__
File "direct/showbase/ShowBase.py", line 1024, in openDefaultWindow
File "direct/showbase/ShowBase.py", line 1059, in openMainWindow
File "direct/showbase/ShowBase.py", line 769, in openWindow
File "direct/showbase/ShowBase.py", line 749, in <lambda>
File "direct/showbase/ShowBase.py", line 821, in _doOpenWindow
File "direct/showbase/ShowBase.py", line 650, in makeDefaultPipe
File "direct/directnotify/Notifier.py", line 130, in error
Exception: No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.
[5466] Failed to execute script 'Shipsim3d_1-1' due to unhandled exception!
Usually, there is a Config.prc file in the etc subdirectory of the panda3d site-package directory. This file is non-existent in the packaged version. But if I create this subdirectory there, and copy the files to it as well, it still doesn't work and it still throws the same exception. There is a line "loadPrcData("win-size 1080 1920")" in my main program as well. Could this be part of the problem in any way? Or is there something else i am missing?
Thanks in advance
I solved this problem by including the whole panda3d lib:
pyinstaller --add-data="path/to/panda3d;panda3d" -wF main.py
When I install any package through pip3 for python 3.7.4 an error occurs in the form:
Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 179, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 393, in run
use_user_site=options.use_user_site,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/req/__init__.py", line 57, in install_given_reqs
**kwargs
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 913, in install
use_user_site=use_user_site, pycompile=pycompile,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 445, in move_wheel_files
warn_script_location=warn_script_location,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/wheel.py", line 320, in move_wheel_files
prefix=prefix,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/locations.py", line 166, in distutils_scheme
d.parse_config_files()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 413, in parse_config_files
val = parser.get(section,opt)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 799, in get
d)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 394, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/configparser.py", line 444, in _interpolate_some
"found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%Y-%m-%d %H:%M:%S'
I didn’t have this before. This problem has appeared recently. The problem occurs on OS X Mojave version 10.14.6
Check your current working directory for a setup.cfg file with unsupported syntax in it.
This is open issue #5182 CLI parses unrelated config files and then crashes, created by me in April 2018.
As a workaround until the issue is fixed, you can cd into a different directory and try installing again.
If found some hits on stackoverflow where people have issues using ete3 tools when PyQT4 is not installed, and this (used to) also apply for me. However, I've now tried to reinstall a piece of software and it keeps complaining about 'Module' has no attritube 'Treestyle'.
To test whether PyQT was installed, I ran this python script:
from PyQt4.Qt import PYQT_VERSION_STR
print("PyQt version:", PYQT_VERSION_STR)
Which prints:
('PyQt version:', '4.12.1')
I get this (common) error:
Traceback (most recent call last):
File "/mnt/f/mypy/bin/virtualmicrobes.py", line 1820, in <module>
sys.exit(main())
File "/mnt/f/mypy/bin/virtualmicrobes.py", line 1793, in main
args.start(args)
File "/mnt/f/mypy/bin/virtualmicrobes.py", line 408, in start_evo_sim
result = init_and_simulate(simu, intermediate_load_file, _options)
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/my_tools/utility.py", line 117, in wrapper
raise ex_type(message)
AttributeError: 'module' object has no attribute 'TreeStyle' (in subprocess)
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/my_tools/utility.py", line 91, in process_func
ret = func(*args, **kwargs)
File "/mnt/f/mypy/bin/virtualmicrobes.py", line 295, in init_and_simulate
sim = sim_mod.create_simulation(**options)
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/simulation/Simulation.py", line 1940, in create_simulation
sim = ODE_simulation(params_dict)
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/simulation/Simulation.py", line 1342, in __init__
super(ODE_simulation, self).__init__(params)
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/simulation/Simulation.py", line 86, in __init__
self.init_graphs()
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/simulation/Simulation.py", line 795, in init_graphs
show=show, clean=clean, create=create)
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/plotting/Graphs.py", line 1188, in __init__
self.init_phylo_tree_graph(clean=clean)
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/plotting/Graphs.py", line 1219, in init_phylo_tree_graph
show=show, attribute_dict=self.attribute_mapper, create=clean, **kwargs)
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/plotting/Graphs.py", line 985, in __init__
self.init_tree_style_dict() # NOTE: unordered ok
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/plotting/Graphs.py", line 1110, in init_tree_style_dict
branch_vertical_margin=branch_vertical_margin)
File "/mnt/f/mypy/local/lib/python2.7/site-packages/VirtualMicrobes/plotting/Graphs.py", line 1083, in make_tree_style
ts = ete3.TreeStyle()
Note: this time arround I am trying to install it on Ubuntu for Windows, but up till now almost everything that ran on Linux ran on this one too. It might be relevent though.
Any ideas?
PS To reproduce the problem, follow the following steps:
$ sudo apt-get install python-qt4
$ virtualenv ~/mypy --system-site-packages
$ source ~/mypy/bin/activate
$ (mypy) > pip install VirtualMicrobes
$ (mypy) > virtualmicrobes evo --name TestMicrobes >> error
PPS User eyllanesc confirmed this is an 'Ubuntu for Windows' problem. I'm still trying to fix it though, if anyone can help me figure out how to link the pyqt4 packages correctly to my virtualenv that would be great. I've tried linken the native one with ln -s but I'm not getting any further
I had similar issues. The problem might be that you don't have all the depencies installed and ete3 is not telling you all of them.
You can see which dependencies are missing with this code:
import ete3
ete3.__file__
Run it and it will tell you which dependencies are missing. Note that you might need to run it multiple times before you install them all!
I'm getting a procedure not found error when trying to call gimp_freaky_bw "from gimpfu" pdb.plug_in_gmic. This worked with an earlier installation of GIMP. I have just installed GIMP 2.8.22 and G'MIC 2.1.1. The error is:
Traceback (most recent call last):
File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 736, in response
dialog.res = run_script(params)
File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 361, in run_script
return apply(function, params)
File "C:\Users\tommy\.gimp-2.8\plug-ins\DIEGO_ARTISTIC_JamackSketch.py", line 124, in JamackSketch
pdb.plug_in_gmic(newImage, FreakyBW, 1, # 1=input only active layer
error: procedure not found
In recent versions of the GMIC plugin the entry point is:
pdb.plug_in_gmic_qt(image, drawable, input, output, command)
and not plug_in_gmic as in the reported error. So, fix the python script, or contact the author to get it fixed.
I run Canopy version Version: 2.1.3.3542 (64 bit) on Windows 10.
Canopy cant manage to update any package, all results in the same
log output for a numpy update (for example):
Warming up...
Traceback (most recent call last):
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\package_action_worker.py", line 54, in run
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\package_action.py", line 196, in execute
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\packman.py", line 626, in <lambda>
File "build\bdist.win-amd64\egg\canopy_dashboard\packman\packman.py", line 1051, in _install
File "build\bdist.win-amd64\egg\canopy_platform\cpython_packages_manager.py", line 152, in install_packages_prompt
File "build\bdist.win-amd64\egg\canopy_platform\cpython_packages_manager.py", line 137, in _install_packages_prompt
PackagesInstallationError: installation of packages ['numpy 1.11.3-3'] failed. Details below:
Traceback (most recent call last):
File "build\bdist.win-amd64\egg\canopy_platform\edm_api.py", line 64, in wrapper
File "build\bdist.win-amd64\egg\canopy_platform\edm_api.py", line 384, in install_command
File "build\bdist.win-amd64\egg\canopy_platform\edm_api.py", line 414, in _install_packages_command
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 124, in decorator
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 219, in install_command
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 223, in _install_command
File "build\bdist.win-amd64\egg\edm\core\packages_manager.py", line 549, in _compute_fix_aborted_actions
AbortedOperationDetected: Aborted operation detected in environment 'User'
There is absolutly 0 results on google for this error code, so stackexchange is my last resort
It looks like a previous update was force-aborted, possibly leaving the environment corrupted. Assuming that you are using the standard installer, then it should suffice to
reboot your computer
temporarily disable your anti-virus software if possible (or at least disable its more intrusive / slow functionality, such as online checking each of the tens of thousands of package files that Canopy provides),
from the Canopy Tools menu, select Troubleshoot => Reset Python environment