Git Product home page Git Product logo

Comments (18)

initial-h avatar initial-h commented on July 16, 2024 4

yeah, I pip install tensorflow manually and this problem has been solved. Thanks!

from tianshou.

Trinkle23897 avatar Trinkle23897 commented on July 16, 2024

What's your tensorflow and tensorboard version?

from tianshou.

initial-h avatar initial-h commented on July 16, 2024

I just pip install git+https://github.com/thu-ml/tianshou.git@master directly. Need I install tf and tensorboard additionally for I didn't found these requirements in readme.

from tianshou.

Trinkle23897 avatar Trinkle23897 commented on July 16, 2024

Tianshou has already added the tensorboard in the requirement, in https://github.com/thu-ml/tianshou/blob/master/setup.py#L53
Maybe something went wrong through the installation? Or have you already installed the tensorboard before installing tianshou? Upgrade them first.

from tianshou.

initial-h avatar initial-h commented on July 16, 2024

No. I create a new env with conda, and pip install this repo.
conda create -n pytorch python==3.6.5
pip install git+https://github.com/thu-ml/tianshou.git@master
There may be something wrong among conda and pip

  writing requirements to tianshou.egg-info/requires.txt
  writing top-level names to tianshou.egg-info/top_level.txt
  writing manifest file 'tianshou.egg-info/SOURCES.txt'
  reading manifest file 'tianshou.egg-info/SOURCES.txt'
  writing manifest file 'tianshou.egg-info/SOURCES.txt'
  Copying tianshou.egg-info to build/bdist.linux-x86_64/wheel/tianshou-0.2.2-py3.6.egg-info
  running install_scripts
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-vr3fo7qw/setup.py", line 73, in <module>
      'pybullet',
    File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
      return distutils.core.setup(**attrs)
    File "/anaconda3/envs/pytorch/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/anaconda3/envs/pytorch/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/anaconda3/envs/pytorch/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 215, in run
      self.run_command('install')
    File "/anaconda3/envs/pytorch/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/anaconda3/envs/pytorch/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
      return orig.install.run(self)
    File "/anaconda3/envs/pytorch/lib/python3.6/distutils/command/install.py", line 557, in run
      self.run_command(cmd_name)
    File "/anaconda3/envs/pytorch/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/anaconda3/envs/pytorch/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/setuptools/command/install_scripts.py", line 17, in run
      import setuptools.command.easy_install as ei
    File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 52, in <module>
      from setuptools.package_index import (
    File "/anaconda3/envs/pytorch/lib/python3.6/site-packages/setuptools/package_index.py", line 27, in <module>
      from setuptools.wheel import Wheel
  ModuleNotFoundError: No module named 'setuptools.wheel'
  ----------------------------------------
  ERROR: Failed building wheel for tianshou

from tianshou.

Trinkle23897 avatar Trinkle23897 commented on July 16, 2024

Hmm...That's a problem. This morning I helped another person for installing tianshou on Anaconda. The following command works fine:

# create a new virtualenv and install pip, change the env name if you like
conda create -n myenv pip 
# activate the environment
conda activate myenv
# install tianshou
pip install tianshou

In short, please make sure the pip is installed in your created venv.

from tianshou.

initial-h avatar initial-h commented on July 16, 2024

There is still the same problem...

from tianshou.

Trinkle23897 avatar Trinkle23897 commented on July 16, 2024

Have you tried upgrading your conda, e.g., conda update conda?

from tianshou.

initial-h avatar initial-h commented on July 16, 2024

Make no difference. It's the latest version already I think.

conda upgrade --all
Collecting package metadata (repodata.json): done
Solving environment: done
# All requested packages already installed.

from tianshou.

Trinkle23897 avatar Trinkle23897 commented on July 16, 2024

No. I create a new env with conda, and pip install this repo.
conda create -n pytorch python==3.6.5
pip install git+https://github.com/thu-ml/tianshou.git@master
There may be something wrong among conda and pip

I test it but the second command pip is not in your "pytorch" venv. It will install some package outside your env.

from tianshou.

initial-h avatar initial-h commented on July 16, 2024

conda will install pip, like you mentioned before.
conda create ...
source activate ...
pip install ...

from tianshou.

Trinkle23897 avatar Trinkle23897 commented on July 16, 2024

So what's the output of "which pip" or "pip -V"?

from tianshou.

initial-h avatar initial-h commented on July 16, 2024

you mean pip version? it's 20.0.2
pip 20.0.2 from /anaconda3/envs/pytorch/lib/python3.6/site-packages/pip (python 3.6)

from tianshou.

Trinkle23897 avatar Trinkle23897 commented on July 16, 2024

Hmm...that's quite strange. BTW, I think "tensorflow" has no attribute "io" can be resolved by installing tensorflow manually. Though in the unittest it doesn't need to install tensorflow and still runs well.

In [11]: import tensorflow as tf

In [12]: tf.io
Out[12]: <module 'tensorflow._api.v1.io' from '/home/trinkle/.local/lib/python3.6/site-packages/tensorflow_core/_api/v1/io/__init__.py'>

from tianshou.

Trinkle23897 avatar Trinkle23897 commented on July 16, 2024

You can also manually comment the lines of SummaryWriter in the test script :)

from tianshou.

Poojitha67 avatar Poojitha67 commented on July 16, 2024

yeah, I pip install tensorflow manually and this problem has been solved. Thanks!

I am facing the same issue. Can you pls help me resolve it?

from tianshou.

anggajulian14 avatar anggajulian14 commented on July 16, 2024

how to install tensorflow manually?

from tianshou.

Trinkle23897 avatar Trinkle23897 commented on July 16, 2024

pip install tensorflow

from tianshou.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.