No module named buildout.buildout - zope

I'm trying to setup a Zope app following the steps in the official tutorial.
After downloading the Zope distribution and bootstrapping the buildout, I get to the last step, bin/buildout, and this error follows:
Traceback (most recent call last):
File "bin/buildout", line 9, in <module>
import zc.buildout.buildout
ImportError: No module named buildout.buildout
How should I proceed?

Try instead the instructions in
https://pypi.python.org/pypi/bobtemplates.plone (call it from the src-directory)
and
https://github.com/plone/bobtemplates.plone
and use a virtualenv:
virtualenv mrbobvenv
source mrbobvenv/bin/activate

Related

Cannot import sentinelsat python module

I am a python newbie and am trying to get the sentinelhub module to work but have been receving this error message on my code:
import sentinelhub
Traceback (most recent call last):
File "<pyshell#0>", line 1, in
import sentinelhub
ImportError: No module named sentinelhub
After I've downloaded the module using "pip install sentinelhub" on the windows command. I am currently using Python version 2.7.18. Any suggestions would be helpful. Thanks.
It looks like sentinelhub requires a different version of Python.
From their own website they specify that it "requires Python >=3.7"
https://sentinelhub-py.readthedocs.io/en/latest/install.html

How to Include a Directory Structure in Analytics Zoo

I want to execute a file on Analytics zoo but this file uses functions from other files in different subdirectories .
I am getting this error:
LogType:stdout LogLastModifiedTime:Tue Jun 15 06:43:07 -0500 2021 LogLength:157 LogContents: Traceback (most recent call last): File "main.py", line 7, in <module>
from args import define_main_parser ModuleNotFoundError: No module named 'args'
End of LogType:stdout
Here args.py is a separate file (I provided this file path in --py-files while spark file submission)
Please try to add your module to the PYTHONPATH environment variable using export PYTHONPATH=$PYTHONPATH:/path/to/your/modules on the driver node.

Tensorflow-gpu, has no attribute "python_io"

I am trying to create a custom TFrecords.
When I called a script that uses the tf.python_io.TFRecordWriter(..) as ...:
this error came up
log:
Traceback (most recent call last):
File "createtfrecordsbyother.py", line 105, in <module>
main(args)
File "createtfrecordsbyother.py", line 85, in main
num_shards=num_shards_train)
File "createtfrecordsbyother.py", line 45, in create_tfrecords
with tf.python_io.TFRecordWriter(output_filename) as tfrecord_writer:
AttributeError: module 'tensorflow' has no attribute 'python_io'
Switched to the tensorflow,ver1.15 .
After switching to that version that error is gone and replaced with a warning that states module is depreciated with a new name (io) instead of (python_io)
Note many modules also changed the name.
and downgrading tensorflow may require a updates of CUDA and Cudnn library.
It's not a complete solution to those who wanted to stay in Tensorflow2.0-gpu
But I will post this as a solution for those who are like me fine with downgrade to 1.15.
For uninstall tf,please refer to tf official documentation under install page.

Anaconda install of Tensorflow missing 'audio_ops' from contrib framework

I'm trying to follow along the Audio Recognition Network tutorial.
I've created an Anaconda environment with python 3.6 and followed the install instruction accordingly for installing the GPU whl.
I can run the 'hello world' TF example.
When I go to run 'train.py' in the Audio Recognition Network tutorial/example, I get:
Traceback (most recent call last):
File "train.py", line 79, in <module>
import input_data
File "/home/philglau/speech_commands/input_data.py", line 35, in <module>
from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio
ImportError: cannot import name 'audio_ops'
The code in the tutorial that fails is:
from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio
I then backed up that chain until I could import some part of it:
import tensorflow.contrib.framework as test ==> works
import tensorflow.contrib.framework.python as test --> fail:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow.contrib.framework' has no attribute 'python'
Not sure where I'm going wrong on my install.
Details:
Ubuntu 16.04
Anaconda env with python 3.6
Followed the 'anaconda' instruction on the TF install page. (GPU version)
I also tried using a python 2.7 env for anaconda but got the same results.
It looks like they're releasing the audio_ops modules in version 1.4 (https://github.com/tensorflow/tensorflow/issues/11339#issuecomment-327879009).
Until v1.4 is released, an easy way around this is to install the nightly tensorflow build
pip install tf-nightly
or with the docker image linked in the issue comment.
The short answer:
The framework is missing the "audio_ops.py" and the example wont work until the file is released. Or you code the wrappers.
More on this:
If you go to the: tensorflow.contrib.framework.python.ops local folder you can find other *_ops.py files but not the "audio_ops.py".
If you get it from the Master at: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/framework/python/ops
You will find the file is almost empty and with import labels wrong: "audio_ops" vs "gen_audio_ops".
With almost empty I mean that: decode_wav, encode_wav, audio_spectrogram , mfcc are not implemented/wrapped.
So, no working example and no fun.
We need to check again when "audio_ops.py" is released.
Here:
https://github.com/tensorflow/tensorflow/issues/11339
You can find a Developer saying: "we don't actually want to make them public / supported yet. I'm sorry this decision wasn't better documented"

Running HtmlUnit with Jython

This question is similar to this one and this one
I am running windows 7(x64) and following the example on this page:
http://blog.databigbang.com/web-scraping-ajax-and-javascript-sites/
I get a similar error:
Traceback (most recent call last):
File ".\gartner.py", line 24, in
import com.gargoylesoftware.htmlunit.WebClient as WebClient
ImportError: No module named gargoylesoftware
Running the script as (with the latest htmlunit-2.9):
>> jython -J-classpath "htmlunit-2.9/lib/*" gartner.py
I have also attempted second answer to this to no avail.
Any suggestions?
Thanks
Edit1:
I added "htmlunit-2.9/lib/" to my classpath through the system environment variables.
>> jython gartner.py
Same error as above.