Comments (19)
numpy: 1.19.5
pandas: 1.1.5
matplotlib: 3.3.4
sklearn: 0.24.2
yfinance: 0.1.63
from deep_learning_machine_learning_stock.
This input generates below error :
df = df.as_matrix()
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [5], in <cell line: 1>()
----> 1 df = df.as_matrix()
File ~/.local/lib/python3.10/site-packages/pandas/core/generic.py:5575, in NDFrame.getattr(self, name)
5568 if (
5569 name not in self._internal_names_set
5570 and name not in self._metadata
5571 and name not in self._accessors
5572 and self._info_axis._can_hold_identifiers_and_holds_name(name)
5573 ):
5574 return self[name]
-> 5575 return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'as_matrix'
`
from deep_learning_machine_learning_stock.
What pandas version are you using?
df.as_matrix() was deprecated after version 0.23.0. Use df.values instead.
from deep_learning_machine_learning_stock.
girish@mypc:~$ gedit pd.py
girish@mypc:~$ python3 pd.py
1.4.2
girish@mypc:~$ cat pd.py
import pandas as pd
print(pd.__version__)
girish@mypc:~$
from deep_learning_machine_learning_stock.
Did you trying using df.values?
from deep_learning_machine_learning_stock.
Yes, it worked. But there are errors in next/rest inputs. As you mentioned earlier that I should have all the packages of those version, how do I keep them as a temporary basis so that rest things don't suffers and how do I install those version packages please.
from deep_learning_machine_learning_stock.
Example: pip install pandas==1.1.1
Just to let you know some of my codes are old.
from deep_learning_machine_learning_stock.
And your supported python version please? Because I am not able to pip install pandas==1.1.1. Below Error :
girish@mypc:~$ pip install pandas==1.1.1
Defaulting to user installation because normal site-packages is not writeable
Collecting pandas==1.1.1
Using cached pandas-1.1.1.tar.gz (5.2 MB)
Installing build dependencies ... \
.... Very huge messages
error: Command "x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-
protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -I/usr/local/include -I/usr/include -Ibuild/src.linux-x86_64-3.1/numpy/core/src/umath -Ibuild/src.linux-x86_64-3.1/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.1/numpy/core/src/common -Inumpy/core/include -Ibuild/src.linux-x86_64-3.1/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.10 -Ibuild/src.linux-x86_64-3.1/numpy/core/src/common -Ibuild/src.linux-x86_64-3.1/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.1/numpy/core/src/common -Ibuild/src.linux-x86_64-3.1/numpy/core/src/npymath -c build/src.linux-x86_64-3.1/numpy/core/src/multiarray/scalartypes.c -o build/temp.linux-x86_64-3.10/build/src.linux-x86_64-3.1/numpy/core/src/multiarray/scalartypes.o -MMD -MF build/temp.linux-x86_64-3.10/build/src.linux-x86_64-3.1/numpy/core/src/multiarray/scalartypes.o.d" failed with exit status 1
[end of output]
` note: This error originates from a subprocess, and is likely not a problem with pip.` ` error: legacy-install-failure` ` ` ` × Encountered error while trying to install package.` ` ╰─> numpy` ` ` ` note: This is an issue with the package mentioned above, not pip.` ` hint: See above for output from the failure.` ` [end of output]` ` ` ` note: This error originates from a subprocess, and is likely not a problem with pip.` `error: subprocess-exited-with-error`
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
``
note: This error originates from a subprocess, and is likely not a problem with pip.
`girish@mypc:~$ `
As always, life is tough. You Github people never supports testers... Never explains required version, never shows code in action, Sorry.
from deep_learning_machine_learning_stock.
I NEVER ABLE TO RUN ANY GITHUB CODE WITHOUT ANY ERROR. EVERY TIME THERE IS ISSUE AND SEES "BYE ME A COFFEE"
from deep_learning_machine_learning_stock.
Sorry about the issues.
That was just an example: pip install pandas==1.1.1. Like I say some of my codes are old and some of the codes I was using old version packages or new version packages. Python library packages is always updating.
from deep_learning_machine_learning_stock.
I have upload the update version. "Basic_Machine_Learning_Predicts_Updates.ipynb" .
from deep_learning_machine_learning_stock.
You Said "I have upload the update version. "Basic_Machine_Learning_Predicts_Updates.ipynb" ."
From where I can download it?
from deep_learning_machine_learning_stock.
from deep_learning_machine_learning_stock.
Still issue not solved. Let me elaborate what I did and where I am now :
When I tried to install :
numpy: 1.19.5
pandas: 1.1.5
matplotlib: 3.3.4
sklearn: 0.24.2
yfinance: 0.1.63
I could not able. Because different sources were telling that I need to have python 3.8. So I installed python 3.8 (little bit different story, but yes, it got installed link is : https://www.linuxcapable.com/how-to-install-python-3-8-on-ubuntu-22-04-lts/) and then uninstalled numpy,pandas,sklearn,yfinance. Then I ran : (in environment)
pip install numpy==1.19.5
pip install pandas==1.1.5
pip install scikit-learn==0.24.2
pip install yfinance==0.1.63
ipython kernel install --user --name=test_app_venv
(test_app_venv) girish@mypc:~/test_app$ jupyter notebook
[I 2022-10-01 19:31:43.244 LabApp] JupyterLab extension loaded from /home/girish/.local/lib/python3.10/site-packages/jupyterlab
[I 2022-10-01 19:31:43.244 LabApp] JupyterLab application directory is /home/girish/.local/share/jupyter/lab
[I 19:31:43.247 NotebookApp] Serving notebooks from local directory: /home/girish/test_app
[I 19:31:43.247 NotebookApp] Jupyter Notebook 6.4.8 is running at:
[I 19:31:43.247 NotebookApp] http://localhost:8888/?token=acf21f9aa4b5f9c959f9f3668d07b6261a577a23da2d8a23
[I 19:31:43.247 NotebookApp] or http://127.0.0.1:8888/?token=acf21f9aa4b5f9c959f9f3668d07b6261a577a23da2d8a23
[I 19:31:43.247 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 19:31:43.261 NotebookApp]
But, it is saying Pandas is missing. It is not loading with python 3.8 and above version libraries. I don't know how these all will run in today's environment python 3.10 and ubuntu 22.10.
when I says :
from deep_learning_machine_learning_stock.
Even, when I changes the kernel in Juypter it is still saying :
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 import pandas as pd
2 import numpy as np
3 import math
ModuleNotFoundError: No module named 'pandas'
When I says :
(test_app_venv) girish@mypc:~/test_app$ cat pd.py
import pandas as pd
print(pd.__version__)
(test_app_venv) girish@mypc:~/test_app$ python pd.py
1.1.5
(test_app_venv) girish@mypc:~/test_app$ python --version
Python 3.8.13
(test_app_venv) girish@mypc:~/test_app$
from deep_learning_machine_learning_stock.
I am using python version 3.6.
from deep_learning_machine_learning_stock.
Are you sure, above error stack will be removed if I install 3.6?
from deep_learning_machine_learning_stock.
This is what I am using.
numpy: 1.19.5
pandas: 1.1.5
sklearn: 0.24.2
yfinance: 0.1.63
os system: nt
Python Version: 3.6.13 |Anaconda, Inc.| (default, Mar 16 2021, 11:37:27) [MSC v.1916 64 bit (AMD64)]
Platform System: Windows
I have not test on new version of python. I am mostly using Python 3.5 and 3.6.
from deep_learning_machine_learning_stock.
I created a Virtual Machine Ubuntu 18.04 which comes python 3.6.9 with it.
But, my issues are not going to end :
girish@pc1804:~$ pip install numpy==1.19.5
Collecting numpy==1.19.5
Could not find a version that satisfies the requirement numpy==1.19.5 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1, 1.16.0rc2, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6)
No matching distribution found for numpy==1.19.5
girish@pc1804:~$ python3 --version
Python 3.6.9
girish@pc1804:~$
from deep_learning_machine_learning_stock.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deep_learning_machine_learning_stock.