Python Can't Import Modules [closed] - python

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have installed multiple modules using pip but I can't access any of them. I can check and see that the modules are installed using pip list, but when I try to access them in python I just get ModuleNotFoundError no matter what. I can't find any help anywhere online and honestly just want to stop learning python because I have so many problems like this every day.

There seemed to be two different locations python was installed to. Problem solved by moving f2py.exe to the proper location and setting the proper PATH locations.

Don't give up! Python is great. I think you've installed the modules in an environment which might not be the same your code uses at runtime.
At the top of your code try to add:
import sys
print(sys.path)
You might notice that your code uses another location.

Related

How can I resolve a python version error issue? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 months ago.
Improve this question
I am trying to install the package conifer on python. The steps for installation are listed on the GitHub. After following such steps, I get a python version error as shown on the image attached. Nevertheless, I am running on the version the package requires. I am thinking it could be an issue with pip, and I tried different things, including replacing pip with pip3. It still did not work. Thus, I am wondering if anyone here has some advice regarding this issue. Thanks in advance.
I think you misread the error message, 3.7.12 not in ">=3.8" means "the current version 3.7.12 does not fall in the range 'versions greater than or equal to 3.8'" - and it clearly doesn't. That required version range at the end >=3.8 is what was defined for conifer and you'll see different ones for different packages, for example it could also be ==3.8 (i.e. has to be exactly 3.8) or <3.8 (only works for versions older than 3.8)

Add a path to libraries for python in VS Code Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I have pandas installed in computer via Anaconda that I downloaded previously and now when I wish to use VS Code, I tried installing pandas using pip install pandas and it said that the Requirement is already satisfied. I am not sure what path to change and how to change, though I have been able to locate pandas through pip freeze. Please help!!
You do not need to install pandas again even tho you're using a different IDE, you might have added the python PATH in your environment variables and that's it.
Can you just try
import pandas as pd
in your VSCode to cross check?
By default it does not recognize your anaconda environment, You need to change your python interpreter path in VS Code: check this Change Python Interpreter

SyntaxError in PyCharm [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
Can someone help me fix this issue:
File "/Users/mac/PycharmProjects/NoteBot/main.py", line 5
PATH =
^
SyntaxError: invalid syntax
I think you are trying to run the PS5 bot using the inbuilt python that comes on your mac, i.e., probably Python2.7.
The issue is the author of the bot used a feature introduced in Python 3.5 called type hints.
So you need to change the version of Python that Pycharm is using to a version above 3.5 (google this). Or just run the script from the Terminal app using:
python3 /Users/mac/PycharmProjects/NoteBot/main.py
Note: You may need to install selenium etc. again here using pip3. Pycharm probably will handle this for you if you get it to point at a Python3 installation.
Furthermore, if you want to learn to program in Python yourself after you snag a PS5 you may want to look into pyenv.

Can not run Jupyter with powershell [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I can not run Jupyter even though I install it. .
I tried even, to but in the end, it does not work. How can I start it now? It is possible that I have on Windows an OneDrive Path?
I had the same problem. When python or any other language is stored in a Onedrive path, it wont be accessible from the pc. It will need to be stored in the C drive for it to be accessible. I would re install Jupyter notebook and python and try again.
This time install python in your c drive as well as
Jupyter notebooks

How to read/write .xpt file with Python? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Am new to Python and looking for a solution to read/write xpt file(SAS data set) using Python.
I got to know its possible using Python from this link. But then the code is not working as expected. Anything missing in this code, whether to include any library or to install any library. Or even any syntax error in this code.
with open('example.xpt', 'rb') as f:
for row in xport.Reader(f):
print row
Note: Am familiar with PHP scripting.
Please help me with suitable solution.
You need to import the package to use xport
Import xport
And have to install the package by
sudo pip install xport

Categories

Resources