I am not able to install pyfolio in my local jupyter environment.
After !pip install pyfolio, the success message comes, but when I run 'import pyfolio as pf'
the following error throws.
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NaTType'
Can anyone suggest how to install pyfolio?
The main Python Package Index (pypi) entry for pyfolio here is no longer supported as described here.
Following the suggestions there, you may want pyfolio-reloaded (repo: here).
Following the directions at the repo, try running in a cell in a new notebook the following:
%pip install pyfolio-reloaded
Restart the kernel and and then try:
import pyfolio as pf
Related
I am trying to import Pennylane in jupyter notebook. I installed it using Ubuntu.
import pennylane as cents
However, it is spewing out this:
ImportError: cannot import name 'shape'
I found two reasons online. One is that python needs to be at version less than 3.7[https://github.com/PennyLaneAI/pennylane/issues/1922]. To solve this I used pip install -U jupyter. Another reason is that Pennylane might be at a version earlier enough that it had a bug[https://discuss.pennylane.ai/t/importerror-cannot-import-name-shape/1383]. I installed Pennylane to the latest version I could find, 0.25. I did pip install pennylane==0.25 But it still does not work
Could someone please explain this to me?
I tried to make a AI for minecraft using python's library minerl.
import gym
import minerl
env = gym.make('MineRLObtainDiamond-v0')
But for some reason I get this error:
self.shape = ()
AttributeError: can't set attribute
Can someone tell me why I get an error?
I run it on the latest python version, python 3.9.7, on Pycharm and I use Windows 10 build 19402.
You have too new gym installed. Run the command:
pip install gym==0.19 and try again.
https://github.com/minerllabs/minerl/issues/620
I found this script (tutorial) on GitHub (https://github.com/amyoshino/Dash_Tutorial_Series/blob/master/ex4.py) and I am trying to run in my local machine.
Unfortunately I am having and Error
I would really appreciate if anyone can help me to run this script.
Perhaps this is something easy but I am new in coding.
Thank you!
You probably just need to pip install the dash-core-components library!
Take a look at the Dash Installation documentation. It currently recommends running these commands:
pip install dash==0.38.0 # The core dash backend
pip install dash-html-components==0.13.5 # HTML components
pip install dash-core-components==0.43.1 # Supercharged components
pip install dash-table==3.5.0 # Interactive DataTable component (new!)
pip install dash-daq==0.1.0 # DAQ components (newly open-sourced!)
For more info on using pip to install Python packages, see: Installing Packages.
If you have run those commands, and Flask still throws that error, you may be having a path/environment issue, and should provide more info in your question about your Python setup.
Also, just to give you a sense of how to interpret this error message:
It's often easiest to start at the bottom and work your way up.
Here, the bottommost message is a FileNotFound error.
The program is looking for the file in your Python37/lib/site-packages folder. That tells you it's looking for a Python package. That is the directory to which Python packages get installed when you use a tool like pip.
I received an error on atom, it asked to install ipkernal using pip.
Not sure what to do. I have Anaconda on my system and not pip. Can someone explains whats the error about and how can I solve it in using anaconda.
I was running a python code and saved the file as .py.
import pandas as pd
wd = pd.read_csv("winequality-red", sep = ";")
five = wd.head()
print ("five")
Error message:
No kernel for grammar Python found <br>
Check that the language for this file is set in Atom and that you have a Jupyter kernel installed for it.<br>
To detect your current Python install you will need to run:<br>
python -m pip install ipykernel<br>
python -m ipykernel install --user
This isn't really an answer, but you might have better luck on the dedicated Atom forums.
In your case though, it looks like you haven't installed the proper kernels Hydrogen needs to run Python with. (Of course, I'm just assuming you're using Hydrogen. You haven't actually provided any details about how you are trying to run it).
From the Hydrogen documentation, it takes you to this page for Python kernels.
https://nteract.io/kernels/python
In particular, I think you want to run the command conda install ipykernel
I have been able to install pycrypto as follows, followed the given answer.
But when I debug the project, then getting the following issue which seems to be related Crypto.
ModuleNotFoundError: No module named 'winrandom'
aut\token.py line 3 is
from jose.jwt import get_unverified_claims
UPDATE:1
Then, I have run pip install winrandom and get the following error.
TypeError: '>=' not supported between instances of 'NoneType' and
'str'
UPDATE:2
When I rung the proposed command pip install --proxy http://XXXX:80 git+https://github.com/dlitz/pycrypto.git with proxy(required) in the working environment, then I get a connection refused error as follows.
It seems this is a common issue with pycrypto. This is a bug, but the project doesn't seem to be updated in the last couple years.
Digging over the issue, (https://github.com/andrewcooke/simple-crypt/issues/17)
It seems the poblem is solved by doing an edit to the import statement in crypto\Random\OSRNG\nt.py:
import winrandom
to
from . import winrandom
As Vinny mentioned, this issue is known and solved in Pycrypto, but PyPi still delivers an old release of Pycrytpto. You can instead install the latest release directly from the GitHub repository by using:
pip install git+https://github.com/dlitz/pycrypto.git