How can I get around this pycparser installation error using poetry? - python-3.6

I'm using the latest version of poetry (1.1.10) and while trying to update my lock file, I ran into an error while attempting to install pycparser==2.20:
Writing lock file
Package operations: 65 installs, 0 updates, 0 removals
• Installing pycparser (2.20)
ValueError
File \C:\Users\user\AppData\Local\pypoetry\Cache\artifacts\3b\b4\2e\87ea123a592747e6f6c798c66837974694db0bca4783357f71718a538d\pycparser-2.20-py2.py3-none-any.whl does not exist
at c:\users\boris\miniconda3\envs\project\lib\site-packages\poetry\core\packages\file_dependency.py:40 in __init__
36│ except FileNotFoundError:
37│ raise ValueError("Directory {} does not exist".format(self._path))
38│
39│ if not self._full_path.exists():
→ 40│ raise ValueError("File {} does not exist".format(self._path))
41│
42│ if self._full_path.is_dir():
43│ raise ValueError("{} is a directory, expected a file".format(self._path))
I tried changing my poetry version as well as that of pycparser, but that only seems to break other packages. Has anyone dealt with this before, and if so can you point me in the right direction?
Specs:
OS: Windows 10
Python version: 3.6
poetry==1.1.10
pycparser==2.20

I had the same issue which was resolved by deleting the Poetry cache folder: C:\Users\user\AppData\Local\pypoetry

Related

nbsphinx causes build to fail when building Jupyter Notebooks

Details
I am getting a build failure of my read-the-docs that I don't understand. The assertion of "verbatim" in line 2151 of nbsphinx.py is causing the build failure. So the build fails when I try to include the Jupyter Notebook tutorials I created. I compared current versions of the tutorials to previous versions which had not caused the build to fail, and I can't find a difference that could account for the current failure.
Read the Docs project URL: lofti_gaia
Build URL: https://github.com/logan-pearce/lofti_gaia
Read the Docs username: logan-pearce
Expected Result
A passing build including *.ipynb files
Actual Result
Build failed at line 2151 of nbsphinx.py due to assertion of 'Verbatim' failing.
Terminal output:
Running Sphinx v4.1.2
loading translations [en]... done
making output directory... done
WARNING: html_static_path entry '_static' does not exist
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
processing lofti_gaia.tex... index installation tutorials/QuickStart tutorials/Tutorial api lofti loftitools
resolving references...
done
writing... failed
Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/lofti-gaia/conda/latest/lib/python3.7/site-packages/nbsphinx.py", line 2151, in depart_codearea_latex
assert 'Verbatim' in lines[0]
AssertionError
The full traceback has been saved in /tmp/sphinx-err-x1h83s3m.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
According to the github issue 584 for nbsphinx (https://github.com/spatialaudio/nbsphinx/issues/584), this is due to a compatibility issue with sphinx 4.1.0. It can be gotten around by requiring sphinx version 4.0.2.
So in my requirements.txt file, I included sphinx==4.0.2, after which the build passes. So now my requirements.txt file looks like:
numpy
matplotlib
astropy>=4.0.1.post1
astroquery>=0.4
sphinx==4.0.2
ipython==7.19.0
nbsphinx>=0.8.6
and the build passes.
I have encountered the same issue. I did not solve it with .ipynb format, but converting the jupyter notebook to .rst format works.
May it helps

New version of OpenSSL causes Plone/Zope to not start

Today's (1 Mar 2016) OpenSSL release has caused the following error when running Plone/Zope
.buildout/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/persistent/cPersistence.so: undefined symbol: SSLv2_method
It's hard to see what's going on since it's a binary file. I also tried updating to ZODB3 3.11.0 which yields the following traceback
.buildout/eggs/ZConfig-2.9.0-py2.7.egg/ZConfig/loader.py", line 217, in schemaComponentSource
package=package)
ZConfig.SchemaResourceError: could not load package ZServer:
.buildout/eggs/zope.security-3.7.4-py2.7-linux-x86_64.egg/zope/security/_proxy.so: undefined symbol: SSLv2_method
Package name: 'ZServer'
File name: 'component.xml'
Package path: None
Is there any workaround for this other than reverting OpenSSL?
zope security is a compiled egg, like all the ones ending with -py2.7-linux-x86_64.egg.
As the traceback says, it cannot find anymore a symbol.
Probably you have to recompile it with the new openssl-dev.
I would try (on a development server first):
backup your compiled egg (mkdir eggs-backup && mv `eggs/zope.security-3.7.4-py2.7-linux-x86_64.egg eggs-backup/)
rerun buildout
This will recompile your missing egg.
Hopefully it works and hopefully it is the only one linked to that library.
Anyway, dependending on the way you patched openssl you may have a lot of other issues (I am thinking about Python, urllib*, curl, wget, ...)
OpenSSL 1.0.2g by default doesn't build with SSLv2 (because of the recent DROWN attack). You may need to manually build it without OPENSSL_NO_SSL2 flag.
(but in fact you shouldn't do this if you're doing some server-related stuff, there is a serious security reason because of which it was disabled, see https://drownattack.com)
I was able to resolve this by upgrading python to 2.7.10+, and then upgrading Pillow and lxml.

R EnvironmentError: Could not find Ghostscript on path. RWebLogo

I ran into an odd issue that I cannot fix in any way and I was hoping someone here may have a better understanding of whats wrong;
I am unable to use RWebLogo package - even run the simplest examples due to the same missing Ghostscript error.
e.g. running:
library(RWebLogo)
aln <- c('CCAACCCAA', 'CCAACCCTA', 'AAAGCCTGA', 'TGAACCGGA')
weblogo(seqs=aln, file.out='mylogo.pdf')
Throws this error:
Traceback (most recent call last):
File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogo", line 71, in <module>
weblogolib._cli.main()
File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/_cli.py", line 82, in main
formatter(data, format, opts.fout)
File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/__init__.py", line 757, in pdf_formatter
gs = GhostscriptAPI()
File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/__init__.py", line 196, in __init__
raise EnvironmentError("Could not find Ghostscript on path."
EnvironmentError: Could not find Ghostscript on path. There should be either a gs executable or a gswin32c.exe on your system's path
I have installed ghostscript ver 9.15 with configure/make/install in the terminal and then added the PATH to bash profile and executed it. When I run gs in the terminal it works, confirming it is set to the system path, yet the same error still occurs. Even after rebooting.
I tried adding the gs to the environment in R directly:
Sys.setenv(R_GSCMD = "/Applications/ghostscript-9.15/bin/gs")
which also hasn't helped... Gives exactly the same error. When I search the R environment it shows that gs is there.
Important version information:
MAC: OS Yosemite 10.10.1;
R version 3.1.1 (2014-07-10);
Platform: x86_64-apple-darwin10.8.0 (64-bit);
RWebLogo_1.0.3
Do you know of any issue that may have cause this problem? I'm new to programming, so I am worried I may be missing something basic. I would be grateful for any advice. Thank you!
I have gotten in touch with Omar, the author of RWebLogo, and he has been really helpful in pinpointing my problems and resolving the issue.
First, he advised to run the RWebLogo on a test sequence on the terminal:
/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogo -f test_seqs.txt -o ~/Desktop/out.pdf -F pdf
Change the base directory (everything before extdata/weblogo …) of the script above to be whatever the command below gives you in R:
system.file(package = 'RWebLogo')
I ran it and got a new error: the lack of numpy. I actually had the numpy installed but without full user privileges. After reinstalling numpy, the RWebLogo was successfully running from the terminal.
Still, the RStudio was throwing a GhostScript error. Omar suggested that there is a problem with an older version of RStudio running on Yosemite (I currently have 10.10.1), and sent me a link to an updated RStudio version where the problem was fixed.
http://www.r-bloggers.com/r-and-rstudio-incompatibility-with-yosemite-mac-os-x-10-10/
I got the updated RStudio and everything works great there right now. Hope this helps someone with a similar issue!

Heroku & HHVM & WordPress installation problems

I'm trying to install Heroku / HHVM / WordPress on a Debian 6 64 bits VPS to test this kind of setup for my blog (Nginx + MySQL + HP-FPM + Varnish + WordPress on another Debian 6 64 bits VPS) following the recent and promising guide done by Xiao Yu and available on GitHub.
I'm absolutelly new to Heroku/Ruby and I'm affraid I'm quite lost when something not expected is happening. The installation guide seemed to be straightforward, but it isn't clear which packages do I need to install first (PHP-FPM? Nginx? Or does this script install those by itself?) and I'm stuck on this step:
git push heroku production:master
When I execute that, I get this:
Initializing repository, done.
Counting objects: 344, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (162/162), done.
Writing objects: 100% (344/344), 72.73 KiB, done.
Total 344 (delta 139), reused 342 (delta 139)
-----> PHP app detected
! ERROR: Could not resolve composer.lock requirement for HHVM 3.1.0,
please adjust the version selector. The following runtimes are available:
hhvm-3.2.0 php-5.5.11 php-5.5.12 php-5.5.13 php-5.5.14 php-5.5.15
php-5.6.0RC4
! Push rejected, failed to compile PHP app
To git#heroku.com:xxxxxx-fortress-xxxx.git
! [remote rejected] production -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:xxxxxxx-fortress-xxxx.git'
I've tried to take a look at composer.json, edit it and include a
"php": "~5.5.11",
line on the require section, but that doesn't work... unless I have to do something before (update composer.lock? How?), which I'm not sure about.
What am I doing wrong?
Thanks!
HHVM 3.1.0 is not available (anymore), as the error message points out. You would however have to update composer.lock too.
Your best bet is to just update from the template; it's been fixed there: https://github.com/xyu/heroku-wp/commit/2a0ea2097597f72c401a63c070a14ec5031ffc9d

Julia: Problems with Adding Packages (BinDeps)

I am new to Julia's package manager, and I am having trouble installing GLPK and LinProgGLPK.
I have already run Pkg.Init() and have successfully installed Curl using Pkg.add("Curl"). However, when I try to install GLPK or LinProgGLPK (using Pkg.add("GLPK") and Pkg.add("LinProgGLPK")), I get the following message:
MESSAGE: Installing BinDeps v0.0.0
ERROR: Path BinDeps already exists! Please remove to allow installation.
in _resolve at pkg.jl:345
in anonymous at no file:163
in cd at file.jl:26
in cd_pkgdir at pkg.jl:42
in add at pkg.jl:143
in add at pkg.jl:175
I seem to get the same message for other packages that are dependent on BinDeps (including Winston).
I have tried calling Pkg.rm("BinDeps"), Pkg.add("BinDeps"), Pkg.update(), and Pkg.resolve(), and then returned to trying to add GLPK, but the same message persists. I have also entered ~/.julia to remove the BinDeps folder, but that did not work either. What am I missing?
P.S. I am running julia in Linux Ubuntu.
Honestly, when something gets screwed up, it's best just to wipe ~/.julia and re-add the packages.
Just make sure you back up your local changes!

Resources