Error running jupyterlab via pip install in python 3.9 - python

Hello I am fairly new to Python and I'm trying to get started with data visualization. I pip installed jupyter lab but it gave the error of jupyter-troubleshoot.exe and jupyter.exe are installed in 'C:\Users\myusername\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p which is not on PATH. I have had problems in the past with accessing csv files using VSCode so I think there might be an issue with my directory. How do I change this to PATH so the jupyterlab runs?
Thank you!

Related

ModuleNotFoundError after installing PyUpSet

Reference: https://github.com/ImSoErgodic/py-upset
Hello! I have installed pyupset via both pip, pip3, and the source directly, as described in the link above. The terminal is saying that I have it completely downloaded. However, when I go to spyder and type "Import pyupset", I get the ModuleNotFoundError. After some research, it seems as though there's a discrepancy between the Python 3.8 library it is downloading to and the Python 3.9.5 I am using in Spyder, and that is the reason it doesn't show up. Does anyone know how to access the Python 3.8 downloads or generally have a way to access the script? I've also tried with a script updated for the recent Python iterations (https://github.com/jnothman/UpSetPlot) that does a similar function, but I'm getting the same error. Thank you!
Inside spyder try using import pip then run !pip install py-upset which should add it to your 3.9.5 environment.

Why can I not import a module (Batman) in Jupyter Notebook

I'm trying to import a module (batman, for model transits) in jupyter notebook, but its telling me file not found. However when I use the anaconda terminal it imports without issues
This is the error I get from Jupyter Notebook
I've tried reinstalling the package, and I've tried to find a kernel in which it works, but I'm not sure how to go about that
any help is appreciated
Try checking if the module installed properly by running this:
python -c 'import batman; batman.test()'
the batman module also seems to have some issues when installing on windows.
Read this github if you're on windows https://github.com/lkreidberg/batman/issues/26
I've faced the same issue when I use Jupyter in an Anaconda environment. Jupyter Notebook doesn't use the same kernel as Anaconda and I had to specify it manually.
What you can do is comparing the Python version on your Anaconda environment by running this command in your shell:
python --version
And in your Notebook :
import sys
print(sys.version)
Are the versions different ? If so, you must add your Anaconda kernel to your Notebook :
ipython kernel install --name "local-anaconda-env" --user
Then select it in your Notebook.
I was facing the same issue in VSC. What I did is that first I moved the folder(In your case batman) to where VSC had been installed on my laptop. Then I changed the default directory to where VSC was installed on my laptop by running the following code in VSC.
import os
os.chdir("The path where VSC is installed")
Also If you could try to do the code in a python file instead of jupyter notebook
In a cell within your notebook run the following:
%pip install batman-package
Based on here.
And the use of modern pip install magic to handle installing to correct enviornment from inside a notebook, see here.
For others, hitting here and not seeing what they want/expect.
Above is for batman:
Bad-Ass Transit Model cAlculatioN. Associated Github Repo is here, and Python Package Index page.
This is a poor name for a package as at least three developers have claimed this. Also see:
Anaconda install for Batman at conda-forgeBayesian Analysis Tool for Modelling and uncertAinty quaNtification
BATMAN: A Python deployment toolbelt -Batman 0.7.0 at the Python Package Index
Maybe those links will help you.

Run into error: no module named 'encoding' when I launch Jupyter notebook

When I launch the Jupyter notebook from anaconda navigator, there will be some errors. I am using Mac.
I tried to search it up on Google and StackOverflow, but I still can not figure a way to fix this issue.
Based on my searches, I assumed the issue is showing up because I have multiple python versions, and there might be some issues with my directory? ( Maybe in Anaconda, it is pointing to a wrong python directory? )
and these are the screenshots of the error.
Can someone see what is the issue here?
Screenshots of the errors :
Use :
pip install torch-encoding
if it throw any error try to clone it from
https://github.com/zhanghang1989/PyTorch-Encoding
after that, run the setup
python setup.py install

I'm getting "'python' is not recognized as an internal or external command" error since I deleted anaconda files

I have been using python for about 1 year. I deleted the anaconda files on my computer and now I get this error. I thought they were unnecessary. Is Anaconda not an ide? Why is it no longer working because I deleted it? What should I do now?
Anaconda is not an IDE, it's an open source distribution of Python and R. You should or reinstall anaconda and install again all python packages, or download python from the webpage and just install python without anaconda.

Using PyQ in Jupyter Notebook

I am trying to use PyQ in Jupyter, a package designed to communicate between the Python and Q/kdb+ programming language. I am successfully able to install Q/kdb+ on my Windows computer (where the q.exe file is located in the standard C:), pip installed pyq, and opened Jupyter with Anaconda Navigator. However, when I create a new .ipynb notebook and attempted to initialize Q using PyQ, I am presented with:
ImportError: Importing pyq from stock python is not supported. Run path\to\q.exe python.q.
How do I fix this problem? Thank you!
You need to install pyq-kernel.
Please see Installing Jupyter Kernel for details.

Categories

Resources