Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

ImportError: No module named 'argh' #5

Closed
ghost opened this issue Jan 7, 2017 · 5 comments
Closed

ImportError: No module named 'argh' #5

ghost opened this issue Jan 7, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 7, 2017

$ sudo -H pip install argh
Requirement already satisfied: argh in /usr/local/lib/python2.7/dist-packages

Then:

$ python3 main.py preprocess games/*
Traceback (most recent call last):
  File "main.py", line 2, in <module>
    import argh
ImportError: No module named 'argh'

Using 64-bit Xubuntu Linux:

$ python3 --version
Python 3.5.2
@prescod
Copy link

prescod commented Jan 7, 2017

pip install argh
pip install gtp
pip install sgf

@prescod
Copy link

prescod commented Jan 7, 2017

In general you should use pip install -r requirements.txt but you may have a challenge with the TensorFlow version as I did. I ended up pip installing the latest TensorFlow.

@ghost
Copy link
Author

ghost commented Jan 7, 2017

I changed the last line of requirements.txt to:

tensorflow>=0.9.0rc0

Then:

mkdir $HOME/temp
cd $HOME/temp
git clone https://github.com/brilee/MuGo.git
cd MuGo
unzip $HOME/archives/professional-go-games.zip (NB: creates "games/" directory)
sudo apt install virtualenv
virtualenv -p python3 py3
source py3/bin/activate
pip install -r requirements.txt
python3 main.py preprocess games/*

This resulted in:

$ python3 main.py preprocess games/*
WARNING:tensorflow:From /home/username/temp/MuGo/policy.py:187 in StatisticsCollector.: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
WARNING:tensorflow:From /home/username/temp/MuGo/policy.py:188 in StatisticsCollector.: scalar_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.scalar. Note that tf.summary.scalar uses the node name instead of the tag. This means that TensorFlow will automatically de-duplicate summary names based on the scope they are created in. Also, passing a tensor or list of tags to a scalar summary op is no longer supported.
WARNING:tensorflow:From /home/username/temp/MuGo/policy.py:189 in StatisticsCollector.: merge_summary (from tensorflow.python.ops.logging_ops) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.merge.
3369 sgfs found.
Estimated number of chunks: 164
Allocating 0 positions as test; remainder as training
Writing test chunk
Traceback (most recent call last):
  File "main.py", line 81, in <module>
    argh.dispatch(parser)
  File "/home/username/temp/MuGo/py3/lib/python3.5/site-packages/argh/dispatching.py", line 174, in dispatch
    for line in lines:
  File "/home/username/temp/MuGo/py3/lib/python3.5/site-packages/argh/dispatching.py", line 277, in _execute_command
    for line in result:
  File "/home/username/temp/MuGo/py3/lib/python3.5/site-packages/argh/dispatching.py", line 260, in _call
    result = function(*positional, **keywords)
  File "main.py", line 47, in preprocess
    process_raw_data(*data_sets, processed_dir=processed_dir)
  File "/home/username/temp/MuGo/load_data_sets.py", line 153, in process_raw_data
    test_dataset = DataSet.from_positions_w_context(test_chunk, is_test=True)
  File "/home/username/temp/MuGo/load_data_sets.py", line 105, in from_positions_w_context
    positions, next_moves, results = zip(*positions_w_context)
ValueError: not enough values to unpack (expected 3, got 0)

@greatken999
Copy link

use "pip3 install argh" when you use python3

@brilee
Copy link
Owner

brilee commented Jan 24, 2017

Yeah, looks like a python3/pip3 mismatch issue to me.

@brilee brilee closed this as completed Jan 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants